Need help making a game? Just post your question here and I will add a step-by-step walkthrough on how to make it!
Offline
Here is horsescats456's request for a virtual pet game walkthrough.
Part 1- Title Screen
Before you start making the actual game, you need to make a place that will actually let you go into it. To do this you need a title screen.
The first part of the title screen you need to make is the background. You can draw one using the Paint Editor, download an image off the internet, or use one of your own photos or pictures.
Next you need to make the buttons. You will need to make just 2 sprites: a Play button and an Instructions button. You can use an animal sprite to match the theme of your game, create your own design, or use a photo.
The final part of the title screen is the scripts. Here is an example of a script for the buttons:
[blocks]<when green flag clicked>[/blocks]
[blocks]<show>[/blocks]
[blocks]<when[ button ]clicked>[/blocks]
[blocks]<broadcast[ start game/open instructions[/blocks]
[blocks]<hide>[/blocks]
When you add the broadcasting message, for the "open instructions" message, make sure you add a background for the instructions including the text which will be the instructions. Then, add a "when I receive" block to the Stage, telling it to switch to the instructions background when it receives the "open instructions" message. The "start game" message you will complete later.
Part 2- The Start
The first part you need to make of the actual game is the background of when you first enter the game. I suggest making the beginning of the game an Adoption Center. Make the Adoption Center background. Then add the sprites. The sprites will be the different animals to choose from. Make about 5 sprites.
Each of the sprites will lead to the second part of the game. Just add this script to all of the animal sprites:
[blocks]<when green flag clicked>[/blocks]
[blocks]<hide>[/blocks]
[blocks]<when[ dog ]clicked>[/blocks]
[blocks]<broadcast[ game part 2[/blocks]
Then, whenever your animal is clicked, it will lead to part 2 of the game (the bit where you actually play it.)
Part 3- The Controls
Once you've done that, you need to make some variables. The variables will be the animal's health, thirst, hunger and happiness. Therefore you need to create 4 variables with those names. Don't forget to add a script to the Stage that will set the variables to 50 each:
[blocks]<when green flag clicked>[/blocks]
[blocks]<set{ health }to( 50[/blocks]
Now you just need to add the buttons. Make the sprites for the buttons in the same way as you did for the buttons for the title screen, except add these scripts:
[blocks]<when green flag clicked>[/blocks]
[blocks]<hide>[/blocks]
[blocks]<when[ feed button ]clicked>[/blocks]
[blocks]<broadcast[ feed pet ]and wait c>[/blocks]
[blocks]<change{ hunger }by( 20[/blocks]
Then, your pet will get fed, cleaned or exercised whenever the corresponding button is pressed. Make sure that you also add a script which views a reminder when your pet is hungry, thirsty or unhappy/healthy, and a script that views a reminder when the pet's health, hunger, thirst or happiness is over 100 when the button is pressed.
Part 4- Animation/The Broadcasting Messages
Now you just need to make things happen when your pet gets fed or something. For example, if you make an "eating" costume for your pet, then you can add a script like this to it to make it eat when the "feed" button is pressed:
[blocks]<when I receive[ feed pet[/blocks]
[blocks]<switch to costume[ eating[/blocks]
Finally, you can now play the game! You can add lots of things to make it more interesting (this is just a simple walkthrough) but don't forget to add a "current pet" variable, so that when a certain pet is chosen, it's name will get added to the variable. Then, when a button is pressed, the pet that is showing will switch to whatever costume, instead of the horse eating it's food instead of the dog, for example.
I hope that you can successfully make your virtual pet game! Happy Scratch-ing!
Offline
hotbruno7 wrote:
<change pen color by(
Is that a question or a random post?
Offline
pokemon_master12 wrote:
hotbruno7 wrote:
<change pen color by(
Is that a question or a random post?
I think it's spam, although he doesn't know he's doing it because it's his first post.
Offline
bosox397 wrote:
pokemon_master12 wrote:
hotbruno7 wrote:
<change pen color by(
Is that a question or a random post?
I think it's spam, although he doesn't know he's doing it because it's his first post.
yeah ur right. peoples 1st posts are usaully spam, just like me!
Offline
golfer3 wrote:
bosox397 wrote:
pokemon_master12 wrote:
Is that a question or a random post?I think it's spam, although he doesn't know he's doing it because it's his first post.
yeah ur right. peoples 1st posts are usaully spam, just like me!
Well 200 of YOUR posts are spam
Offline
How can I make a simple Sonic the hedgehog game?
Offline
Hi. I'm making a Baseball Manager game and I'm just learning Scratch. I'm wondering if there is a simple "clear screen" command, but if not, how do you make all your Sprites disappear? For example when switching from your Title Screen to your actual game. Thanks for your help.
Offline