Discuss Scratch
- Discussion Forums
- » Help with Scripts
- » If Statement for when Variable reaches 0 - How do I make one?
- storytb
-
1 post
If Statement for when Variable reaches 0 - How do I make one?
I have a game where a spaceship has a shield of 100 and goes through a maze and I want it to blow up when/ “if” the shield gets to 0.
https://scratch.mit.edu/projects/58133472/#player
How do I make the variable or sensor of when the score hits 0 that the costume changes?
Thanks,
Tom
https://scratch.mit.edu/projects/58133472/#player
How do I make the variable or sensor of when the score hits 0 that the costume changes?
Thanks,
Tom
- Birdlegs
-
1000+ posts
If Statement for when Variable reaches 0 - How do I make one?
This is probably better, as it has padding in case the variable goes below zero :3
- deck26
-
1000+ posts
If Statement for when Variable reaches 0 - How do I make one?
Rather than a forever loop checking the value and not actually doing anything else useful you could use
followed by what you want to happen.
followed by what you want to happen.
- zacadoole1
-
100+ posts
If Statement for when Variable reaches 0 - How do I make one?
The first one only works once, but the second one will keep working if you have another script change the variable to something higher than 0 right away.
Last edited by zacadoole1 (April 21, 2015 22:42:17)
- -frostyiceprincess-
-
1000+ posts
If Statement for when Variable reaches 0 - How do I make one?
Please do not spam or necropost.
- VOVEX
-
1 post
If Statement for when Variable reaches 0 - How do I make one?
Thank you for helping me.
This helped me on my project so much!!

- deck26
-
1000+ posts
If Statement for when Variable reaches 0 - How do I make one?
There's no need to thank people when it makes the topic move back to the top of the forum. Thank you for helping me.This helped me on my project so much!!
Please don't spam. hi
- Bautista990
-
2 posts
If Statement for when Variable reaches 0 - How do I make one?
thanks soooooooooooooooooooooooooooo much
- Bautista990
-
2 posts
If Statement for when Variable reaches 0 - How do I make one?
its was alot of help
- deck26
-
1000+ posts
If Statement for when Variable reaches 0 - How do I make one?
Still not necessary to necropost to say that though. its was alot of help
- Discussion Forums
- » Help with Scripts
-
» If Statement for when Variable reaches 0 - How do I make one?