So I made this jump script and I was wondering how do I make a ceiling that when I'm jumping and I touch it I stop moving up and I move down.
Here's my jumping script
when [up arrow] key pressed repeat [10] change y by [10] wait [0.25] secs repeat [10] change y by [-10]
Offline
I made a slight error in the jump script
when [up arrow] key pressed repeat [10] change y by [10] end wait [0.25] secs repeat [10] change y by [-10]
Offline
Using a very similar script to yours:
when [up arrow] key is pressed set [counter v] to (1) repeat until <<(counter) = (10)> or <touching colour [ceiling color]?>> change y by [10] change [counter v] by (1) end wait [0.25] secs repeat (counter) change y by [-10] endNot saying this is the best way but will change your scripts by the least amount possible while achieving the desired effect
Last edited by Prestige (2012-10-01 17:06:38)
Offline
Prestige wrote:
Using a very similar script to yours:
when [up v] key pressed set [counter v] to (1) repeat until <<(counter) = (10)> or <touching [ceiling color v]?>> change y by [10] change [counter v] by (1) end wait [0.25] secs repeat (counter) change y by [-10] endNot saying this is the best way but will change your scripts by the least amount possible while achieving the desired effect
Offline
Rsrilaya wrote:
So simple........
Use [scratchblocks]
when gf clicked
if <touching edge>>
change y by [-3]
Actually, that wouldn't work because if you go to the left/right edge you'll go down, and you won't be able to stand on the bottom edge.
Offline
If you need help, comment on one of my games to say so and I will do my very best to download your game and fix the bugs or help with any problems I can. If I can't do it, I will love your game to say sorry, but I will probably love it even if I can fix it because some things people come up with on scratch take my breat away!
Offline