One way to make your game more challenging is to make a platform shrink if the spritetouches it. This screencast will show you how to make shrinking platforms, then you’llhave a chance to create them for your game. First, you’ll need to find a way to shrinkthe platform sprite. Before, you used the shrink tool to shrinka sprite by clicking on it. With computer science, you can programthe computer to do things, like this, for you. In this case, you will tell the computer toshrink the platform if the sprite touches it.
To shrink the sprite, click on looks and drag out the “change size by” block.
Clicking this block makes the sprite bigger. To make the sprite smaller, change this valueto a negative number.
Good, that makes it smaller.
This platform should shrink, if the sprite touches it.
Go to control, drag out an if statement, and place it around the “change size by” blockThen, go to sensing, drag out a “touching” block, and change the value to the name ofthe main character sprite.
Now this reads:Now, you need to tell the computer when to check this if statement.
The computer needs to check the if statement the the entire time the program is running.
To make sure that happens, put a forever block around the if statement.
You also need to let the computer know when to run the code. Add a “when flag clicked”block to tell the code when to start running. Test your code to see if that worked.
When the sprite touches the platform, the platform starts to shrink.
There is one problem, though. The sprite never returns to its full size. Anyone who playsthis game now will have a tiny platform. Well, that’s no fun!
To fix that, put a “set size to 100%” block just under the “when flag clicked” block.
Now, the platform will always start the game at full size.
Choose an Add-On
Time to Celebrate!
Create a wild winning celebration using some of these ideas.
Make your game more challenging by creating moving platforms.
Create a shrinking platform to increase your game's difficulty.
Splash! You Lose
Create a way for the player to lose in your game.
Add Some Tunes
Add some background music to your game.
Bug Fix: Land on Your Feet...or Not
Fix the bug that allows things other than a sprite's feet to keep it on a platform.