WarCraft: Source

 

SpeedAdd

Page history last edited by freddukes@... 1 yr ago

Speed Add


 

This command is similar to Speed, whereas this instead of setting a new value, it adds the amount to the current speed value of the player... e.g. with a value of 0.5, it will add 0.5 to the current users speed, not set the speed to 0.5

 

The correct syntax is:

 

wcs.Command(<userid>).SpeedAdd(<amount to add or deduct>)

 

  • Userid - The player who you'd like to change the speed of
  • Amount to add/deduct - The amount of speed to add to the current value. If you wish to deduct, use a minus value.

 


def player_hurt(ev):

    wcs.Command(ev['userid']).SpeedAdd(-0.1)

    # Minues 0.1 from the players current speed

    gamethread.delayed(1,wcs.Command(ev['userid']).SpeedAdd,0.1)

    # Add 0.1 back on in 1 second

 

Comments (0)

You don't have permission to comment on this page.