The Daily Click ::. Forums ::. Klik Coding Help ::. Double tap running
 

Post Reply  Post Oekaki 
 

Posted By Message

Hideki



Registered
  06/08/2003
Points
  21
19th October, 2003 at 16:08:31 -

can someone pleaz help me out, i am making a platform game were you can walk and run, but to run you have to double tap and hold the key down(duh!!) but i do not know how to do it, i have checked in the search bar and found one thing but i dont understand it, pleaz help me.

 
n/a

LittleGuy (Ecstasy Studios)



Registered
  22/12/2002
Points
  1497
19th October, 2003 at 16:12:45 -

how about:
if key pressed start timmer
if key pressed agian before timer reachers say 50 hundreths of a second then run

thats very simply put - ask if you want to help you do that

 
A Crusader for the LittleGuy's

Click Cell, a full fat community site, http://clickcell.tk

MattB



Registered
  23/05/2002
Points
  342
19th October, 2003 at 16:59:15 -

exactly what i was gonna suggest. that's what i always do.

 
"The light which puts out our eyes is darkness to us."
-Henry David Thoreau

Hideki



Registered
  06/08/2003
Points
  21
20th October, 2003 at 05:34:48 -

yeh i need help to do that dont quite understand what you mean by start timer? and im using mmf.


 
n/a

MattB



Registered
  23/05/2002
Points
  342
20th October, 2003 at 09:48:35 -

here's what you do:

new condidtion: upon pressing right arrow, you need to set a timer to however much time you want the player to double-tap the key in. let's say 50/100 of a second.

then you want to have two conditions combined: a)that the player presses and holds whatever key and b)that the timer is greater than zero. that means that your time has not yet expired, since it counts back from 50. when these two conditions are met, then insert your run event.

that should work. i haven't tested it. but in all logic, it should.

 
"The light which puts out our eyes is darkness to us."
-Henry David Thoreau

Knudde (Shab)

Administrator
Crazy?

Registered
  31/01/2003
Points
  5125

Has Donated, Thank You!Clickzine StaffKlikCast StarVIP MemberGhostbuster!Dos Rules!I donated an open source project
20th October, 2003 at 11:05:58 -

Here we go-------
[Player 1 Moves Right+Alterable Value A(Player) = 0] -> [Set AltVal A(Player) = 5]
[Every .10 seconds + AltValA(Player) > 0] -> [Subtract 1 from AltVal A(Player)]
[Player 1 Moves Right + AltVal A (Player) > 0] -> [Dash Code Here + Set ValueA = 0]

Now, this might work correctly, or it may bause you to instantly dash, I don't have TGF or MMF in front of me right now, but this is the basis.

 
Craps, I'm an old man!

Klikmaster

Master of all things Klik

Registered
  08/07/2002
Points
  2599

Has Donated, Thank You!You've Been Circy'd!VIP MemberPS3 Owner
20th October, 2003 at 13:10:39 -

Here is how its done:

Player presses (right) // set value A to 5
Every 00:00:10 + Value A > 5 // subtract 1 from value A
Player presses right + Value A > 5 // Set value B to 1
NEGATE Player holds right // Set value B to 0
Value B = 1 // Set speed to 100 (or whatever he does when you double press)

 
n/a

Hideki



Registered
  06/08/2003
Points
  21
20th October, 2003 at 15:07:06 -

thanks all, im gonna try all uve given me, just one more thing can someone tell me were i can find a good custom platform movement thats easy to understand and has benn noted well.


 
n/a

Mr Coffee



Registered
  04/09/2003
Points
  440
20th October, 2003 at 15:16:41 -

Ok, what everyone has said will work but they are WAY overcomplicating it. Here is a VERY simple way to make it happen in THREE very simple events:

Player presses right + speed of player is greater than 0 / Set maximum speed to 40

Player presses left + speed of player is greater than 0 / Set maximum speed to 40

Player speed equals 0 / set maximum speed to 20

The player must NOT decelerate instantly or it will not work.



Image Edited by the Author.

 
99 percent chance that the above post is 100 percent correct.
   

Post Reply



 



Advertisement

Worth A Click