Discuss Scratch
- Discussion Forums
- » Help with Scripts
- » Lava Help?
- HappyFuzzyKitty
-
16 posts
Lava Help?
I can't figure out why, but a simple
doesn't always work for lava. Sometimes, like when the player approaches from the bottom, they pass straight through it and I can't find a way to make it stop doing that.
doesn't always work for lava. Sometimes, like when the player approaches from the bottom, they pass straight through it and I can't find a way to make it stop doing that.
- ErnieParke
-
1000+ posts
Lava Help?
It would be really nice if we can see more of that script. Maybe you can share your project, or post screenshot(s) of the code? Also, are you sure that all of the lava is the same color?
Asking,
ErnieParke
Asking,
ErnieParke
- HappyFuzzyKitty
-
16 posts
Lava Help?
The project is Podball's Mission (https://scratch.mit.edu/projects/70355268/), and I am pretty sure all of the lava is the same color. It is already shared.
- footsocktoe
-
1000+ posts
Lava Help?
I can't figure out why, but a simple
doesn't always work for lava. Sometimes, like when the player approaches from the bottom, they pass straight through it and I can't find a way to make it stop doing that.
You have that IF block inside another IF block, which is the same as saying ONLY IF BOTH A AND B are true. In your case, the sprite would have to be touching BOTH red and white. Just touching red would not be enough.
- ErnieParke
-
1000+ posts
Lava Help?
Adding onto what @footsocktoe said, this problem is affecting both your lava script and your player death script:

Pointing out,
ErnieParke

Pointing out,
ErnieParke
- HappyFuzzyKitty
-
16 posts
Lava Help?
So if I take the scripts out of the white then it might work….?
- footsocktoe
-
1000+ posts
Lava Help?
So if I take the scripts out of the white then it might work….?
I don't know what will work, but be sure you think carefully about exactly what you want Scratch to do. Sometimes it's difficult to figure out the logic of what seems like should be a simple task, but with a computer everything has to be perfect.
- sensei1007
-
14 posts
Lava Help?
(you will need to add a sprite called lava)
Last edited by sensei1007 (Feb. 19, 2016 16:57:46)
- Discussion Forums
- » Help with Scripts
-
» Lava Help?