I have made a shooting game which is quite similar to space inavders. But the problem is i want the game to end and say something like "well done" when all the things have been shot.. (when the aliens have been hit by the laser i have simply hidden them, but everything else still carry on...)
Please help
Offline
What you need to do is use the stop all block. (Picture Below) Ghost the Well done sprite and then when the game stops... It should say Well Done!
stop all
Offline
Sholvanic1058 wrote:
What you need to do is use the stop all block. (Picture Below) Ghost the Well done sprite and then when the game stops... It should say Well Done!
stop all
That's actually an interesting trick. When the Stop sign is clicked or the STOP ALL command is initated or executed, the graphic effects are reset. So if a Well Done screen is ghosted, you will see it appear when STOP ALL is initated.
Offline
What do you mean by ghost? im new to scratch..
Offline
RuudVanMurfin wrote:
What do you mean by ghost? im new to scratch..
In the looks palette there should be a Set Color to 0, click the down arrow and select ghost to 100.
Offline
How do i make the game actually stop though? where do i put this stop all block? I have 6 sprites which you have to shoot, and if you shoot them all i want the game to stop.
Offline
RuudVanMurfin wrote:
How do i make the game actually stop though? where do i put this stop all block? I have 6 sprites which you have to shoot, and if you shoot them all i want the game to stop.
What i would do is use a variable called Score (you can create one under variables) and every time you shoot a sprite you change the score by one and then you have a block saying
if <(score) = (6)> stop all endand then the game stops
Last edited by Willpower (2013-01-03 10:24:41)
Offline
RuudVanMurfin wrote:
How do i make the game actually stop though? where do i put this stop all block? I have 6 sprites which you have to shoot, and if you shoot them all i want the game to stop.
This is what you need to do:
when gf clicked forever if <<(Score) = (6)>> stop all
Offline
just remember:
set the score to 0 when starting a new game
change the score by 1 when each alien is shot
wait until the score is what you want, show the well done, then stop all
do NOT ghost the well done screen, because it will show whenever someone presses stop, even if they have not won yet
make sure the well done is hidden when the game starts and shown when the game wins
Last edited by kayybee (2013-01-03 21:27:10)
Offline
kayybee wrote:
just remember:
set the score to 0 when starting a new game
change the score by 1 when each alien is shot
wait until the score is what you want, show the well done, then stop all
do NOT ghost the well done screen, because it will show whenever someone presses stop, even if they have not won yet
make sure the well done is hidden when the game starts and shown when the game wins
Something like this:
when gf clicked set [score v] to [0] wait [0.1] secs //A delay is necessary if the person restarts the game. wait until <(score)=[6]> broadcast [end v] when gf clicked hide set [ghost v] effect to [100] when i receive [end v] show repeat [50] change [ghost v] effect by [-2] end stop all
Last edited by BLU_Spy (2013-01-04 08:15:38)
Offline
thanks for the help guys these do work well, however i have certain objects in which if you shoot them you get say -1 points, so to complete the game doesnt require you to get the best possible score if you know what i mean. Do you know what i can do for that?
Offline
RuudVanMurfin wrote:
thanks for the help guys these do work well, however i have certain objects in which if you shoot them you get say -1 points, so to complete the game doesnt require you to get the best possible score if you know what i mean. Do you know what i can do for that?
So you have some things that gain points and some things that lose points?
EDIT- whoops this is my review account!
Last edited by Willpower_Reviews (2013-01-04 09:57:27)
Offline
Willpower_Reviews wrote:
RuudVanMurfin wrote:
thanks for the help guys these do work well, however i have certain objects in which if you shoot them you get say -1 points, so to complete the game doesnt require you to get the best possible score if you know what i mean. Do you know what i can do for that?
So you have some things that gain points and some things that lose points?
EDIT- whoops this is my review account!
Yeah exactly, can you help?
Offline
RuudVanMurfin wrote:
Willpower_Reviews wrote:
RuudVanMurfin wrote:
thanks for the help guys these do work well, however i have certain objects in which if you shoot them you get say -1 points, so to complete the game doesnt require you to get the best possible score if you know what i mean. Do you know what i can do for that?
So you have some things that gain points and some things that lose points?
EDIT- whoops this is my review account!Yeah exactly, can you help?
can you only click on each target once?
I am trying to recreate your problem as i am having trouble visualising it
Willpower_Reviews is me if you have not already guessed that!
Offline
Willpower wrote:
RuudVanMurfin wrote:
Willpower_Reviews wrote:
So you have some things that gain points and some things that lose points?
EDIT- whoops this is my review account!Yeah exactly, can you help?
can you only click on each target once?
I am trying to recreate your problem as i am having trouble visualising it
Willpower_Reviews is me if you have not already guessed that!
i have 7 things that you have to shoot, and you get points for shooting them, but there are some objects moving infront of them to make it harder to shoot them, if you hit this object you get -1 points. The idea is to shoot all 7 things without them reaching the bottom of the screen. Then see what score you got.
Offline
RuudVanMurfin wrote:
Willpower wrote:
RuudVanMurfin wrote:
Yeah exactly, can you help?
can you only click on each target once?
I am trying to recreate your problem as i am having trouble visualising it
Willpower_Reviews is me if you have not already guessed that!i have 7 things that you have to shoot, and you get points for shooting them, but there are some objects moving infront of them to make it harder to shoot them, if you hit this object you get -1 points. The idea is to shoot all 7 things without them reaching the bottom of the screen. Then see what score you got.
ah okay, give me a second
EDIT- the only way i can think of at the moment is having two variables- have one called "Score" or something similar when you get one for shooting what you are supposed to and lose one for touching bad things but then have a second variable called "Win" or something similar- where you only gain points for hitting the correct targets and when that = 7 you win. I would hide the "Win" variable so no-one can see it because it is not important for the player to see- it just lets the game know when the player has won
Something like this project i have just made to replicate your problem
Testing
Your problem is surprisingly hard- i am trying to think of situations in my games where i have come across this problem.
Last edited by Willpower (2013-01-04 10:37:49)
Offline