Can i make platform run.....

Get help using Construct 2

Post » Fri Apr 21, 2017 12:09 pm

can i make my platform run for few second when i tap touch control once time
B
5
Posts: 9
Reputation: 243

Post » Fri Apr 21, 2017 4:24 pm

Sure,

On touch control touched - set platform speed to whatever speed you want the run to be, wait X seconds, set speed to original speed.


You can make it more robust by setting up a variable and a timer:

If variable = false, when key pressed, set variable to true.

If variable = true, set platform speed to X speed; wait X seconds, set variable to false

if variable = false, set platform speed to original speed.


You could also add a cool down variable if you wanted to make sure the player couldn't run repeatedly without a rest. So if the variable you set up is false, and the cool down timer is greater than 0, you subtract 1 from the timer every 1 second. If the variable is false AND the cool down is 0, then you can run. When the variable is true, you set the cool down to whatever you'd like (maybe 3 seconds is good for the sake of argument).
B
71
S
41
G
24
Posts: 356
Reputation: 18,464

Post » Sat Apr 22, 2017 9:07 am

thank you
B
5
Posts: 9
Reputation: 243


Return to How do I....?

Who is online

Users browsing this forum: purplemonkey and 8 guests