In Scratch programming, there are creations where, right after clicking the green flag, a start screen pops up showing the title, offering menu options, or displaying buttons for various settings. Pretty cool, right?
I'm here to share an easy way to make such a start screen!
Goal: Creating a Start Screen
Here's what the finished product looks like.
How to Make a Start Screen Disappear Quickly
The following screenshots are taken step by step, so let's follow them one by one. You'll definitely finish it if we work together on this.
Time to switch costumes.
Choose any costume you like. Here, I chose an icy background called Arctic.
Back to the code.
When the green flag is clicked, change the background to the Arctic we just picked.
Create a message that says "Play" and set the ghost effect to 100. This means the background disappears when the game starts.
Let's open Sprite 1. When Scratch Cat is clicked, it will send the message to start the game.
Check! Test if the Start Screen Disappears
Okay!
Displaying the Start Screen Again
Let's make sure the start screen shows up again when the green flag is clicked.
Create a message called "Home" to send when the green flag is clicked.
When this message is received, remove the image effect. This makes the ghost effect zero, making it visible again.
Making the Start Screen Fade Out
Right now, it disappears instantly, but it'd be cool if it faded out slowly. It's easy to implement, so let's do it.
Change the action for when the message "Play" is received. It's a similar but different block, so be careful.
Surround this with a loop block that repeats 10 times, and you're good to go!
Check! Test if the Start Screen Fades Out Slowly
Okay! But, Scratch Cat is still there. Let's make it disappear with the start screen.
Making Scratch Cat Disappear with the Start Screen
Drag and drop the message block we just made from the Stage to Sprite 1. This copies it.
Check! Test if Scratch Cat Disappears
Okay! We've made a start screen super easily.
Anything you want to show only on the start screen, like Scratch Cat, just copy the disappearing action by dragging and dropping when the message is received. Conversely, if you want something to appear after the start screen disappears, just make it show up or set the ghost effect to zero when the message is received. That's the logic!
Alright! Scratch on guys!