Pages: 1
Topic closed
Basically I am trying to make a chase game in which a sprite is caught says something, then switches to the next costume. There are other sprites in the game as well who are catching us (the sprite we are controlling). So when Sprite #1 (us) catches Sprite #2, how do I freeze the game temporarily when Sprite #2 says something?
Offline
I would recommend setting the variable "Sprite2 caught?" to "yes" when this happens. In all other sprites, have the scripts run only if the variable is "no". Another way would be to use a broadcast. Did that help?
Offline
To clarify what scimonster said
You should have a forever loop in every sprite, ok?
The first thing inside that script should be an if block that tests if a certain variable (in this case, sprite2 caught) is yes or no. The scripts for all of your sprites should run only if it equals no. In the sprite you use you do not need this if loop. All you need is a loop that says something like:
If touching sprite1
set (touching) to (yes)
say (you caught me) for (4) seconds
switch to costume (caught)
wait until (condition you want to be for new game to start)
end
If this doesn't work, please post the project and I will attempt to make sure everything is right and that we can find a way to make it work.
Offline
http://scratch.mit.edu/projects/liebermary/1792623
Here is the game.... could you also help me that once all the costumes of the sprites: meme1 & meme2, are gone through the game will end?
Thanks for the help!
Offline
liebermary wrote:
http://scratch.mit.edu/projects/liebermary/1792623
Here is the game.... could you also help me that once all the costumes of the sprites: meme1 & meme2, are gone through the game will end?
Thanks for the help!
Instead of:
[blocks]<if><< <touching[ Troll1 <or> <touching[ Troll2 >>[/blocks]
Do:
[blocks]<if><< << <touching[ Troll1 <or> <touching[ Troll2 >> <or> << <( ([costume #] of [Meme1]) <=> 5 )> <and> <( ([costume #] of [Meme2]) <=> 5 )> >> >>[/blocks]
That way if it touches wither troll or both memes are at costume5, it will end.
Last edited by scimonster (2011-05-18 03:55:38)
Offline
Topic closed
Pages: 1