Hi im having problems with platforms, im just creating a simple looking game, but i can't manage to keep the sprite on top of the floor when pressing the jumping key.
when [space] key pressed
forever
if [not(color [] is touching[])]
switch to costume [jumping 3]
change y by [-5]
end
end
Offline
Why are you moving your sprite down when it jumps? Try this:
when [space v] key pressed if<color [] is touching []?> set [i v] to [0] repeat until <<(i) > [5]> or <color [top color] is touching [ceiling]?>> change y by (4) change [i v] by [1] end repeat until <color [] is touching []?> change y by (-4) end end
Last edited by MoreGamesNow (2012-04-16 17:01:34)
Offline
MoreGamesNow wrote:
Why are you moving your sprite down when it jumps? Try this:
when [space v] key pressed if<color [] is touching []?> set [i v] to [0] repeat until <<(i) > [5]> or <color [top color] is touching [ceiling]?>> change y by (4) change [i v] by [1] end repeat until <color [] is touching []?> change y by (-4) end end
If you have gimp, open the color picker and look at the HTML notation. Then you can actually insert a color by putting a # before it.
Offline
chanmanpartyman wrote:
If you have gimp, open the color picker and look at the HTML notation. Then you can actually insert a color by putting a # before it.
I don't know what colors he using to sense or what color the ground is. Descriptive words would help more than colors
Offline
IN my script im trying to use frames, at the moment it can jump fine and move fine, IT'S JUST THOSE * PLATFORMS. i have made soome previous games using a ball and it's fine. so i've decided to try using frames.
Offline