how do i stop gobo from falling throught the platform when he jumps on it!
PLEASE!
Offline
You need to set your gravity script to detect the platform, and only decrease Y when it isn't being touched.
Either have the platform as a sprite, and use "if touching (sprite)", or have the platform a specific colour and use "if touching colour".
Here is an example of the latter.
http://scratch.mit.edu/projects/Mayhem/15862
Offline
what do i put after this to stop it falling through!
and how to i set the gravity to detect platform!?
"if touching (sprite2)2
what goes next?
Offline
It depends on how you have written "gravity" for your sprite.
In effect, though, you need to put a condition on your gravity script so that it only moves your sprite downwards if it isn't touching a platform.
Forever
- If NOT touching (platform)
- change y by -5
wait 0.05
Try something like that, and if you get it workign we can look at teh more advanced idea of it only stopping you falling when you are standing on top of it...
Offline
how do i get the if NOT touching platform?
it isn't there
:S
Offline
Grab a yellow IF block from the Control instructions
Grab a Not from the green Numbers
Grab a Touching from the blue Sensing controls
Drop the Touching into the Not, drop both into the If then select the name of your platform sprite from the drop down menu on the Touching section.
Offline
ah i see! thanks v.much!
Offline