Discuss Scratch
- Discussion Forums
- » Help with Scripts
- » How do you make a sprite temporarily untouchable?
- EnriquitoNiggle
- New to Scratch
1 post
How do you make a sprite temporarily untouchable?
I'm working on a game where you click a creature and he runs away from you. I want to make a power up where you can't click on him for a couple seconds. How do I do that?
- spectre_specs
- Scratch Team
1000+ posts
How do you make a sprite temporarily untouchable?
Moved to Help With Scripts
Mod Squad
- -TUB-
- Scratcher
100+ posts
How do you make a sprite temporarily untouchable?
You can use a variable to keep track of the creature is touchable. When the power up is collected, set the variable to false, and reset it to true after a few seconds. Only run the clicking code if the variable is true.
- CHESHT
- Scratcher
27 posts
How do you make a sprite temporarily untouchable?
Make a variable, set it to true before you click the creature, make your script so in order to click him, the variable must be true, then when the power up is activated, set the variable to false, so when you click the monster, the script does not happen. I'm working on a game where you click a creature and he runs away from you. I want to make a power up where you can't click on him for a couple seconds. How do I do that?
(essentially what the dude above me said)
Last edited by CHESHT (April 8, 2024 03:00:36)
- Discussion Forums
- » Help with Scripts
- » How do you make a sprite temporarily untouchable?