obviously starting with 'when X key pressed';
you can try modelling gravity (need to use your own variables, quite complicated) or you could do it a simple way with something like
'when up arrow key pressed'
'move 50 in y direction'
'wait 0.1 seconds'
'move -50 in y direction'
Offline
you can also do this:
when [up arrow] key pressed point in direction [0] move [10] stepsor, if you want to go down,
when [down arrow] key pressed point in direction [180] move [10] stepsleft is this:
when [left arrow] key pressed point in direction [-90] move [10] stepsand right is this:
when [right arrow] key pressed point in direction [90] move [10] stepshope this helps!
Offline
Here's a way to do a gravity way, and it's not complicated.
Just do this:
For gravity:
when gf clicked forever change y by (-5) endAnd then for the character:
when gf clicked if <key [up arrow v] pressed?> repeat (10) change y by (10) end endThat should work.
Last edited by CAA14 (2013-02-28 19:30:35)
Offline
sunmount wrote:
you can also do this:
when [up arrow] key pressed point in direction [0] move [10] stepsor, if you want to go down,when [down arrow] key pressed point in direction [180] move [10] stepsleft is this:when [left arrow] key pressed point in direction [-90] move [10] stepsand right is this:when [right arrow] key pressed point in direction [90] move [10] stepshope this helps!
That's a good script, but not for jumping. The problem with this is that the character would be able to "jump" as high as they wanted to and never come down. This is good when you are making an overhead game.
Regards,
CAA14
Offline