Discuss Scratch

Da_Boss786
Scratcher
4 posts

New game

I am currently working on a space game. I am trying to make it so that when the rocket crashes, it switches to an ‘explode’ costume and everything stops for 2 seconds, then carries on. help please?
Bright-Idea
Scratcher
1000+ posts

New game

This would be a better fit for Help with Scripts. I'll report it to be moved for you.

I’m Back!
WolfCat67
Scratcher
1000+ posts

New game

Make it so that when the rocket has crashed it broadcasts a message.
when I receive [Rocket Crash v]
switch costume to [Explode v]
broadcast [Stop Other Sprites v]
wait (2) secs
broadcast [Start Game v]
For this last part to work, make the game start not by clicking the flag but by receiving the message Start Game. This could also be broadcast when the flag is clicked. This will pretty much make it so that when the ship crashes, everything will stop and then the game will start up again. Hook up “Stop Other Sprites” like this:
when I receive [Stop Other Sprites v]
stop [other scripts in this sprite v]
That would be inside of every single sprite as well. That way, you will end up with the finished result of everything stopping after your ship crashes, waiting 2 seconds then starting the game over again.
If this doesn't work, I'm sorry; it may mean that you didn't start out with “When I receive Start Game” on all sprites, which may cause some issues. If you're not currently using Broadcasts, you will be unable to use this properly.

amylaser
Scratcher
500+ posts

New game

Best thing to do would be to share your project so we can look at the scripts, and possibly tell you if we see any problems.

Art, Animations, and Games!


~click one to check it out~
GeekGaming11
Scratcher
14 posts

New game

I need help, I'm trying to make a 2d platformer for my ghost game. It would be my first real game. how do I do cut scenes and a.i's
GeekGaming11
Scratcher
14 posts

New game

amylaser wrote:

Best thing to do would be to share your project so we can look at the scripts, and possibly tell you if we see any problems.
I played your games and there realy cool
Da_Boss786
Scratcher
4 posts

New game

WolfCat67 wrote:

Make it so that when the rocket has crashed it broadcasts a message.
when I receive [Rocket Crash v]
switch costume to [Explode v]
broadcast [Stop Other Sprites v]
wait (2) secs
broadcast [Start Game v]
For this last part to work, make the game start not by clicking the flag but by receiving the message Start Game. This could also be broadcast when the flag is clicked. This will pretty much make it so that when the ship crashes, everything will stop and then the game will start up again. Hook up “Stop Other Sprites” like this:
when I receive [Stop Other Sprites v]
stop [other scripts in this sprite v]
That would be inside of every single sprite as well. That way, you will end up with the finished result of everything stopping after your ship crashes, waiting 2 seconds then starting the game over again.
If this doesn't work, I'm sorry; it may mean that you didn't start out with “When I receive Start Game” on all sprites, which may cause some issues. If you're not currently using Broadcasts, you will be unable to use this properly.
Thanks, this has really helped!
Da_Boss786
Scratcher
4 posts

New game

https://scratch.mit.edu/projects/129365985/

if someone could please help me out. everytime the rocket hits the ground, two lives are lost.
bustedthumbs
Scratcher
100+ posts

New game

If you have a little time, you may want to check out the Frogger Competition project in my signature below.

It introduces how to use a game loop in Scratch and has a pausing mechanism when the frog gets hit by a car or splashes in the water. The videos will explain it all or you can look at the scripts.

New to Scratch? See my YouTube Beginners Guide To Scratch Programming or Experienced Programmer Guide

Watch Me Make It -
Memory (Scratch Project) (YouTube Video Series)
Frogger Competition (Scratch Project) (YouTube Video Series)
Music Player Studio (Scratch Project) (YouTube Video Series)
…more to come…
lconaway
Scratcher
500+ posts

New game

GeekGaming11 wrote:

I need help, I'm trying to make a 2d platformer for my ghost game. It would be my first real game. how do I do cut scenes and a.i's
Hi! If you don't mind, it would be best to make your own topic. Also, if you want to compliment amylaser on their projects, why not comment on their profile?

To answer the original question, here is a script that should work. WolfCat67's script would almost work, but here is a version that should work better.

when green flag clicked
broadcast [start game v]

So instead of having everything under the green flag clicked hat block, you would have it under the when I receive start game hat block.

when I receive [Rocket Crashes v]
switch costume to [exploding v]
stop [other scripts in this sprite v]
wait (2) secs
broadcast [start game v]

You can tweak it to fit your own needs.
Hope this helps!

Edit: If WolfCat67's script works for you, you can use it. But if it doesn't, this probably will.

Last edited by lconaway (Nov. 6, 2016 15:48:10)


'Draco Dormiens Nunquam Titillandus'~ Gryffindor, Hufflepuff, Ravenclaw, Slytherin

I hope I was helpful! If you want to visit my profile, feel free to explore the variety of projects, from animations to games to tutorials to quizzes.
And if I forgot to include one, here's a free .
GeekGaming11
Scratcher
14 posts

New game

lconaway wrote:

GeekGaming11 wrote:

I need help, I'm trying to make a 2d platformer for my ghost game. It would be my first real game. how do I do cut scenes and a.i's
Hi! If you don't mind, it would be best to make your own topic. Also, if you want to compliment amylaser on their projects, why not comment on their profile?

To answer the original question, here is a script that should work. WolfCat67's script would almost work, but here is a version that should work better.

when green flag clicked
broadcast [start game v]

So instead of having everything under the green flag clicked hat block, you would have it under the when I receive start game hat block.

when I receive [Rocket Crashes v]
switch costume to [exploding v]
stop [other scripts in this sprite v]
wait (2) secs
broadcast [start game v]

You can tweak it to fit your own needs.
Hope this helps!

Edit: If WolfCat67's script works for you, you can use it. But if it doesn't, this probably will.
thx
Da_Boss786
Scratcher
4 posts

New game

lconaway wrote:

GeekGaming11 wrote:

I need help, I'm trying to make a 2d platformer for my ghost game. It would be my first real game. how do I do cut scenes and a.i's
Hi! If you don't mind, it would be best to make your own topic. Also, if you want to compliment amylaser on their projects, why not comment on their profile?

To answer the original question, here is a script that should work. WolfCat67's script would almost work, but here is a version that should work better.

when green flag clicked
broadcast [start game v]

So instead of having everything under the green flag clicked hat block, you would have it under the when I receive start game hat block.

when I receive [Rocket Crashes v]
switch costume to [exploding v]
stop [other scripts in this sprite v]
wait (2) secs
broadcast [start game v]

You can tweak it to fit your own needs.
Hope this helps!

Edit: If WolfCat67's script works for you, you can use it. But if it doesn't, this probably will.
I did use part of this and part of WolfCat67's

Powered by DjangoBB