#W+W running script

1 messages · Page 1 of 1 (latest)

thorn shore
#

Can someone help me, i dont know how to do it.

#

And i got my animation id too

hidden osprey
#

first make a script

#

then script a script that makes you run

thorn shore
unique river
#

Then you should watch tutorials how to script, because if someone just gonna write this script for you ur not gonna make a good good game with just a run script

simple talon
# thorn shore Can someone help me, i dont know how to do it.

Listen to input began and input ended events. Your looking for the following sequence to happen in a short period of time:
W Down -> W Up -> W Down

This can be simplified to
W Down -> W Down
because you can't press W again without first releasing it

You can easily detect that by

  1. keeping track of the time (os.clock()) that the last W Down event was received
  2. Whenever W is pressed, check how long ago the last W press was and if its within a threshold enable sprint