????? Please be more specific, because if I understand, I probably can help
Offline
[blocks]<when green flag clicked>[/blocks]
[blocks]<forever>[/blocks]
[blocks]<if><touching color[ Your color (or substitute with touching sprite)[/blocks]
[blocks]<change y by( 1[/blocks]
[blocks]<end>[/blocks]
[blocks]<if><< <not> <touching color[ Your color >>[/blocks]
[blocks]<change y by( -1[/blocks]
[blocks]<end>[/blocks]
Is this what you mean?
Offline
Put that script in the stickman
Offline
keroro645 wrote:
it works now,thanks
your welcome, though it's kinda funny because we misread each other, how I'm pretty sure you said sprite and you put it on the ground (which I didn't clarify were it goes)
Offline
actually there's a better way
(for this you'll need to have a layer of an extremely dark gray at the feet
<color (black or most common color) is touching (ground color)
then change Y by 5 (this allows you to climb up steep slopes without bouncing constantly)
<if not touching color (ground color)
then set Yspeed to 0
repeat until touching color (ground color)
change Y by Yspeed
change Yspeed by -0.2
_____________________
set Yspeed to 0
it works a little better and has gravity
Offline
dingdong wrote:
actually there's a better way
(for this you'll need to have a layer of an extremely dark gray at the feet
<color (black or most common color) is touching (ground color)
then change Y by 5 (this allows you to climb up steep slopes without bouncing constantly)
<if not touching color (ground color)
then set Yspeed to 0
repeat until touching color (ground color)
change Y by Yspeed
change Yspeed by -0.2
_____________________
set Yspeed to 0
it works a little better and has gravity
Actually (for my sake too), can you make that with the blocks? I've never really understood gravity in Scratch
Offline
coolstuff wrote:
Yspeed=variable
Well yeah, I know that. I just never get the numbers and why they work
Offline
gravity is extremely simple
http://scratch.mit.edu/forums/viewtopic.php?id=6046#req_message
when green flag clicked
http://scratch.mit.edu/forums/viewtopic.php?id=6046#req_message
forever
http://scratch.mit.edu/forums/viewtopic.php?id=6046#req_message
if http://scratch.mit.edu/forums/viewtopic.php?id=6046#req_message
key up arrow pressed
http://scratch.mit.edu/forums/viewtopic.php?id=6046#req_message
set Yspeed to 6
http://scratch.mit.edu/forums/viewtopic.php?id=6046#req_message
change y by http://scratch.mit.edu/forums/viewtopic.php?id=6046#req_message
{Yspeed
http://scratch.mit.edu/forums/viewtopic.php?id=6046#req_message
repeat until http://scratch.mit.edu/forums/viewtopic.php?id=6046#req_message
touching color ground color
change y by http://scratch.mit.edu/forums/viewtopic.php?id=6046#req_message
{Yspeed
http://scratch.mit.edu/forums/viewtopic.php?id=6046#req_message
change Yspeed by -0.2
http://scratch.mit.edu/forums/viewtopic.php?id=6046#req_message
end
http://scratch.mit.edu/forums/viewtopic.php?id=6046#req_message
set Yspeed to 0
Offline
Let me try:
[blocks]<when green flag clicked>[/blocks]
[blocks]<forever>[/blocks]
[blocks]<if><key[ up arrow ]pressed?>[/blocks]
[blocks]<set{ Yspeed }to( 6[/blocks]
[blocks]<change y by( <{ Yspeed }>[/blocks]
[blocks]<repeat until><touching[ Ground[/blocks]
[blocks]<change y by( <{ Yspeed}>[/blocks]
[blocks]<change{ Yspeed }by( -0.2[/blocks]
[blocks]<end>[/blocks]
[blocks]<set{ Yspeed }to( 0[/blocks]
Last edited by Bluestribute (2008-06-07 13:56:07)
Offline
lol
Offline