hi how can you make a character jump up like a proper game like
call of duty
grand theft auto
halo
etc
i want a game where you jump like game like ive seen many games in scartch like that but how do you do it?
a help will be like a bunch of Gold
Offline
Are you talking about first person jumping? Because I would have usually expected you to mention Super Mario Bros!
Anyway, there are multiple ways that you could to it. One way would be to have a variable called "yspeed", and, for example, when the up arrow is pressed, you would have this script:
[blocks]
<when[ up arrow ]key pressed>
<repeat( 10
<change{ yspeed }by( 1
<end>
<wait( 1 )secs>
<repeat( 10
<change{ yspeed }by( -1
<end>
[/blocks]
And you would also have a script like this:
[blocks]
<when green flag clicked>
<set{ yspeed }to( 0
<forever>
<change y by( <{ yspeed }>
<end>
[/blocks]
Does that help you?
Last edited by throughthefire (2011-03-21 10:38:10)
Offline
Here, this is what I would use:
Make the "if touching ____" into whatever your ground is, if it's a color, make that "if touching color (ground color)" or if it's a sprite, make it "if touching (ground sprite)".
Last edited by Kileymeister (2011-03-21 15:34:33)
Offline
Use Kiley's script, but replace
[blocks]
<key[ up arrow ]pressed?>
[/blocks]
with
[blocks]
<< <key[ up arrow ]pressed?> <and> touching the ground >>
[/blocks]
Substitute 'touching the ground' with whatever script you you for testing if the sprite is touching the ground.
Offline
i done that but if you hold the key up then you can stay up in the game
BUT
i dont want it like that i want that if you press up then the character goes about 4cm up (just a example) and immediately come down instead of going up and staying up if you hold on to the key.
Offline
http://www.scratch.mit.edu/ext/youtube/?v=u13BSy5rCWI
Offline