Hi. I'm making a platform game, and I need some help. In one of the levels, the character has to jump over something. Right now, I have:
when gf clicked forever if <key [space v] pressed?> change y by (30) wait (1.5) secs change y by (-30) end endThis allows me to jump, but I can't move left or right while jumping, so that I can jumper over the obstacle. If I do:
when [space v] key pressed change y by (30) wait (1.5) secs change y by (-30)then it lets me jump, "walk" on the air, and then fall back down at the designated time
Offline
You need your x position to change. I'm assuming you have a right and left key pressed sprite.
when [right arrow v] key pressed repeat until <<key [rightarrow v] pressed ?> = [false]> change x by [30] wait [1.5] secs change x by [30]If not you can just put it in the jump and change nothing.
when gf clicked forever if <key [rightarrow v] pressed ?> change y by [30] change x by [30] wait [1.5] secs change y by [-30] change x by [30]Change your values of x to your choice of course.
Offline
When gf clicked Forever If <key [space v] pressed> Repeat [50] Change y by [2] If <key [rightarrow v] pressed> Change x by [5] End If <key [leftarrow v] pressed> Change x by [-5] End End Repeat until <touching [floor v]> Change y by [-2] If <key [rightarrow v] pressed> Change x by [5] End If <key [leftarrow v] pressed> Change x by [-5] End End End
Hope that helps
Last edited by numberonegamers (2013-01-15 22:07:55)
Offline
I'm guessing you want to use the one button to move and jump at the same time...
So...
when gf clicked forever if <key [space v] pressed?> change x by (10) change y by (30) wait (1.5) secs change y by (-30)
Offline