Discuss Scratch
- Discussion Forums
- » Help with Scripts
- » Help with 'game over' screen
- mmyers12341
-
4 posts
Help with 'game over' screen
Hi,
I'm new to Scratch and I'm making a game for my class project. I remixed a platformer and it's basically done except for the ‘game over’ screen.If I want a ‘you lose’ backdrop to show when the player reaches 10 deaths, how do I do that? I tried to put “If died = 10 then switch backdrop to backdrop3”, where backdrop3 is the losing screen. Any help would be much appriciated.
The game is called Lebron's Path to the NBA Finals
I'm new to Scratch and I'm making a game for my class project. I remixed a platformer and it's basically done except for the ‘game over’ screen.If I want a ‘you lose’ backdrop to show when the player reaches 10 deaths, how do I do that? I tried to put “If died = 10 then switch backdrop to backdrop3”, where backdrop3 is the losing screen. Any help would be much appriciated.
The game is called Lebron's Path to the NBA Finals
- mstone326
-
1000+ posts
Help with 'game over' screen
Welcome to Scratch.
I tried to look but the program crashed my chromebook each time I ran it. I did notice though that your if lives = 10 switch to backdrop3 script was just sitting there not in any loops or part of any broadcasts. That will need to go in a loop of some sort so it can check or needs to be called upon when needed with a broadcast.
I tried to look but the program crashed my chromebook each time I ran it. I did notice though that your if lives = 10 switch to backdrop3 script was just sitting there not in any loops or part of any broadcasts. That will need to go in a loop of some sort so it can check or needs to be called upon when needed with a broadcast.
Last edited by mstone326 (Nov. 4, 2017 21:54:14)
- mmyers12341
-
4 posts
Help with 'game over' screen
I'm not really familiar with broadcasts, but would kind of loop would you suggest putting in there?
- mstone326
-
1000+ posts
Help with 'game over' screen
Try putting it right in your forever loop on that sprite. Also, you may want to use died > 9 instead of died = 10. Just incase your variable double counts for some reason and goes 9 to 11, then the condition =10 will never happen. But if you use > 9 it will run game over with any number over 9.
Let me look again and I'm going to remove your graphic effects and see if my Chromebook does better. If it does I'll come back in a few with a more accurate answer for you
Edit:
Chromebook will not run it. If I can get my other laptop fired up I will try.
Let me look again and I'm going to remove your graphic effects and see if my Chromebook does better. If it does I'll come back in a few with a more accurate answer for you
Edit:
Chromebook will not run it. If I can get my other laptop fired up I will try.
Last edited by mstone326 (Nov. 4, 2017 22:31:39)
- mmyers12341
-
4 posts
Help with 'game over' screen
Alright, I think I got it working. I put the green flag block over the forever block, and that seems to work. Also, that ghosting effect came with the remixed platformer game, so I'm probably better off without it anyway, it does make it run smoother.
- mstone326
-
1000+ posts
Help with 'game over' screen
If you are just starting this project you should take a browse through this tutorial as it has much much more efficient ground detection and such. You code will be much easier to follow as a result. Ideally, a project has minimal forever loops and if possible, only one single forever in the whole project.
Good luck with your project
https://scratch.mit.edu/projects/67727504/
Good luck with your project
https://scratch.mit.edu/projects/67727504/
Last edited by mstone326 (Nov. 4, 2017 22:34:21)
- mmyers12341
-
4 posts
Help with 'game over' screen
Ok, I'll take a look at that tutorial. Thank you so much for your help, it was much appriciated!
- GCC2020T3Y6X3M
-
1 post
Help with 'game over' screen
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
- Discussion Forums
- » Help with Scripts
-
» Help with 'game over' screen