Okay, I'll explain this as best I can.
Do you know what variables are?
Go to variables, click on "create new variable", and type in "yvel" in the box. Click OK, and now, you should see a reporter block with "yvel" written on it. Drag it out, we will be using it.
Use these scripts:
when gf clicked forever if <touching [ground v]?> //Your ground. set [yvel v] to [0] //You can find this block in the variables section. else change [yvel v] by (-0.1) //You can find this block in the variables section. end change y by (yvel) //That "yvel" reporter block.
when gf clicked forever if <<key [up arrow v] pressed?> and <touching [ground v]?>> //Your ground. set [yvel v] to [5] //Change this number higher for a higher jump. wait until <not <touching [ground v]?>> //Your ground. end end
Last edited by SciTecCf (2012-06-06 04:20:34)
Offline
Good Explaination. Remember you could replace
<touching [ground v] ?>with
<touching color [#000000] ?>//colour of groundThe first one will only work if the ground is a seperate sprite
Offline
Yes, good explanation! @scrin445 Scitec's script will work, but if you want the jump higher, or the person to fall faster from the sky, then change how much the variables increase or decrease by.
Offline