|
Posted By
|
Message
|
 Logiq
Registered 09/04/2007
Points 120
|
27th June, 2009 at 00:38:41 -
So I picked up one of my abandoned games today. It's a Top Down dodgeball games. I am having troubles trying to figure out a method of making the player dash a short distance when double tapping the directional button. I search topics on this forum but was only getting something like double tap running, where the player is required to hold the button to keep running... I would like to have a set distance that they will always dash when the button is double tapped. Any ideas? Anything will be helpful.
Hello guys! I'm New! -- I've been new for a year now...haha
|
 Sinclair Strange Has some jaffa cakes in his coat pocket 3
Registered 27/11/2008
Points 80
  
|
27th June, 2009 at 01:28:40 -
A simple method which you could use is to make a counter that times how long the dash will be. (Or use active values).
And then when you double tap, set the counter to 50 or whatever time. Then if the counter is greater than 1 subtract 1 from the counter. (That gives it the time)
Then make an event stating, if counter "Time" is greater than one, make character move faster/more pixels whatever.
Then if you want it to stop before the counter gets to 0, then make a event, that if you do something the counter automatically resets.
This is how I usually do it on TGF, because its easy, and it avoids TGF crashing from weird stuffs.
|
 mojofltr
Registered 12/01/2005
Points 133
|
27th June, 2009 at 01:50:43 -
Hope this helps...
http://www.mediafire.com/download.php?y2rmijkznze
//edit//
Updated the .mfa so that the player cannot interrupt a dash once it is initiated and I made it so that the player can swerve during a dash.
//edit again//
updated again... the last one was broken too! The player could tap and wait 3 minutes and tap again and it would initiate the dash. Not so anymore.
Edited by mojofltr
n/a
|
 Logiq
Registered 09/04/2007
Points 120
|
1st July, 2009 at 21:34:19 -
Thanks a lot guys this helped me a lot. I originally had the normal movement but had to go with a Custom Movement to implement this.
Hello guys! I'm New! -- I've been new for a year now...haha
|
|
|
|