How do you make a sprite temporarily untouchable?

id: 753117

category: Help with Scripts

posts: 4

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?
Moved to Help With Scripts
-TUB- -TUB- loading
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 CHESHT loading

EnriquitoNiggle wrote:

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?
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.

(essentially what the dude above me said)