I'd like it so that instead of holding down the key assigned to 'platform jump' the characters jumps, and then doesn't jump until the button is repressed, rather the character jumps each time it lands, as long as the jump key is pressed. How is this achieved? Thanks! ~zebbi
I'm sorry I don't understand. You want the character to continually jump while the jump key is pressed? Or do you want it to only jump each individual time the key is pressed?
Yes, continually jumping, ie: while the jump key is pressed, the character jumps, then lands, then jumps again immediately after landing, and so on until the jump key is released.
Develop games in your browser. Powerful, performant & highly capable.
Are you using the "Key is Down" event? If so, I believe you need to change that to the "On Key Pressed" event. That should only trigger the event once.
EDIT: Check the post below... <img src="smileys/smiley9.gif" border="0" align="middle" />
OOPS! I read it wrong, It should be the other way around, sorry... <img src="smileys/smiley9.gif" border="0" align="middle" /> Just a guess though, I'm not sure if it'll work.
on key pressed - simulate jump
on landed
key is down - simulate jump.
I tried that, and unfortunately it just does the same thing, the character jumps and stops jumping until the jump key is pressed again! :D Any other ideas? ;)
Is keyDown & Is Player on the Ground
then Simulate jump
Is keyDown & Is Player on the Ground then Simulate jump
Is that the same as 'platform on floor'? If so, unfortunately, that doesn't work! :( Any other ideas? Thanks! ~zebbi
on key pressed - simulate jump on landed key is down - simulate jump.
Have you tried this?
http : //i41 . tinypic . com / 15wz6zk . jpg
Is this what you mean? If so, unfortunately, this doesn't work either :(
Make it two seperate events and it will work.
on w pressed - simulate jump
on platform landed
w is down - simulate jump.
this works.
edit: I used on landed and not is on floor.
It's an event that only triggers once if true.
Make it two seperate events and it will work. on w pressed - simulate jump on platform landed w is down - simulate jump. this works. edit: I used on landed and not is on floor. It's an event that only triggers once if true.
Wow, thank you, this is perfect!! Works exactly as I wished, thanks again! :D
Just wanted to ask, how can I get this to also work for the default arrow key UP jump button? I tried adding the same exact events but assigning them to Arrow Key Up and it doesn't work, but it's fine if I change it from, say, 'w' key to, say, the 'space bar'. Any ideas?
It should also work for the arrow key up, but you'd have to turn off the use default in the behaviour itself, because the default controls will conflict.
So turning of the default controls and recreating them in events and adding this should work.