Discuss Scratch
- Discussion Forums
- » Help with Scripts
- » Need Help...
- Aboyblack10
- Scratcher
75 posts
Need Help...
I'm making my first platformer, and I'm having a little trouble making him stand on the ground. I found one way, but he keeps bouncing nonstop and he walks into a platform if it's higher then him and then floats up slowly as opposed to walking into it. Here is my script:
when gf clickedAlso, I need help with jumping. I get how to jump, but there is no point in jumping if you're just going up then down. I'm not able to move right or left in the air. I tried doing if up arrow and right arrow pressed then jump go right jump go right jump go right then fall fall fall, but that didn't work. Here is what I have:
forever
if <touching color [black]?> then
repeat until <not<touching color [black]?>>
change y by (1)
else
repeat until <touching color [black]?>
change y by (-1)
if <key [up arrow v] pressed?> then
change y by (10)
wait (0.01) secs
change y by (10)
wait (0.01) secs
change y by (10)
wait (0.01) secs
change y by (10)
wait (0.01) secs
change y by (10)
wait (0.01) secs
change y by (10)
wait (0.01) secs
change y by (10)
wait (0.01) secs
change y by (10)
wait (0.01) secs
change y by (10)
wait (0.01) secs
change y by (10)
wait (0.01) secs
change y by (-10)
wait (0.01) secs
change y by (-10)
wait (0.01) secs
change y by (-10)
wait (0.01) secs
change y by (-10)
wait (0.01) secs
change y by (-10)
wait (0.01) secs
change y by (-10)
wait (0.01) secs
change y by (-10)
wait (0.01) secs
change y by (-10)
wait (0.01) secs
change y by (-10)
wait (0.01) secs
change y by (-10)
wait (0.01) secs
if <<key [right arrow v] pressed?> and <key [up arrow v] pressed?>> thenplease help
change y by (10)
move (10) steps
wait (0.01) secs
change y by (10)
move (10) steps
wait (0.01) secs
change y by (10)
move (10) steps
wait (0.01) secs
change y by (10)
move (10) steps
wait (0.01) secs
change y by (10)
move (10) steps
wait (0.01) secs
change y by (10)
move (10) steps
wait (0.01) secs
change y by (10)
move (10) steps
wait (0.01) secs
change y by (10)
move (10) steps
wait (0.01) secs
change y by (10)
move (10) steps
wait (0.01) secs
change y by (10)
move (10) steps
wait (0.01) secs
when green flag clicked
repeat until <looking at player>
next costume
end
repeat until <waving at player>
next costume
end
repeat until <hand is down>
next costume
end
play sound [Hello! v]
- Aboyblack10
- Scratcher
75 posts
Need Help...
I'm making my first platformer, and I'm having a little trouble making him stand on the ground. I found one way, but he keeps bouncing nonstop and he walks into a platform if it's higher then him and then floats up slowly as opposed to walking into it. Here is my script:when gf clickedAlso, I need help with jumping. I get how to jump, but there is no point in jumping if you're just going up then down. I'm not able to move right or left in the air. I tried doing if up arrow and right arrow pressed then jump go right jump go right jump go right then fall fall fall, but that didn't work. Here is what I have:
forever
if <touching color [black]?> then
repeat until <not<touching color [black]?>>
change y by (1)
else
repeat until <touching color [black]?>
change y by (-1)if <key [up arrow v] pressed?> then
change y by (10)
wait (0.01) secs
change y by (10)
wait (0.01) secs
change y by (10)
wait (0.01) secs
change y by (10)
wait (0.01) secs
change y by (10)
wait (0.01) secs
change y by (10)
wait (0.01) secs
change y by (10)
wait (0.01) secs
change y by (10)
wait (0.01) secs
change y by (10)
wait (0.01) secs
change y by (10)
wait (0.01) secs
change y by (-10)
wait (0.01) secs
change y by (-10)
wait (0.01) secs
change y by (-10)
wait (0.01) secs
change y by (-10)
wait (0.01) secs
change y by (-10)
wait (0.01) secs
change y by (-10)
wait (0.01) secs
change y by (-10)
wait (0.01) secs
change y by (-10)
wait (0.01) secs
change y by (-10)
wait (0.01) secs
change y by (-10)
wait (0.01) secsif <<key [right arrow v] pressed?> and <key [up arrow v] pressed?>> thenplease help
change y by (10)
move (10) steps
wait (0.01) secs
change y by (10)
move (10) steps
wait (0.01) secs
change y by (10)
move (10) steps
wait (0.01) secs
change y by (10)
move (10) steps
wait (0.01) secs
change y by (10)
move (10) steps
wait (0.01) secs
change y by (10)
move (10) steps
wait (0.01) secs
change y by (10)
move (10) steps
wait (0.01) secs
change y by (10)
move (10) steps
wait (0.01) secs
change y by (10)
move (10) steps
wait (0.01) secs
change y by (10)
move (10) steps
wait (0.01) secs
I forgot to put the forever blocks but you get the point, they are there.
when green flag clicked
repeat until <looking at player>
next costume
end
repeat until <waving at player>
next costume
end
repeat until <hand is down>
next costume
end
play sound [Hello! v]
- TFLegend
- Scratcher
100+ posts
Need Help...
do you know how to make a succsessfull platform game???
Hi wanna help make a space related Gaming Company? Join Galactic Studio's now!
http://scratch.mit.edu/discuss/topic/20890/?page=26#post-359520
- Aboyblack10
- Scratcher
75 posts
Need Help...
this helpsSee if
Really doesn't help…
when green flag clicked
repeat until <looking at player>
next costume
end
repeat until <waving at player>
next costume
end
repeat until <hand is down>
next costume
end
play sound [Hello! v]
- Discussion Forums
- » Help with Scripts
- » Need Help...