Who would you like to send a postcard to?
Follow the next steps and find out how to program your own postcard with ubbox.
The postcard isn't finished. We've managed to open and close it. Program it to make it more interesting.
Choose a sprite for the cover
Click on the edit pencil for the Balloons sprite.
Choose a sprite.
Edit the name.
Delete the Balloons skin on the left.
Click on Confirm.
Adjust the size and position of the sprite in the game environment.
Add sprite to the inside of the postcard
To make it unique we can add some elements.
Add a new tab by pressing the + button.
Choose a sprite. Check the Celebrations tab.
Name the sprite.
Click on Confirm.
In the Events tab, drag the block when open postcard is received, twice.
Also drag the block when Run ▶︎ is pressed.
Change one of the blocks from open postcard to close postcard.
In the Style tab, drag the show sprite block into the block when open postcard is received.
In the Style tab, dragging a block hide sprite inside the block when close postcard is received and another one into the block when Run ▶︎ is pressed.
Adjust the size and position of the sprite in the game environment so that it is centered when the postcard is opened.
In addition to this element, you can add others to make your postcard unique.
Add a special message
Once we have the sprites chosen, we can have them say a special message to whoever opens our postcard.
On the sprite on the outside of the postcard (Santa Claus), edit the text inside the block say for 3 seconds.
In the sprite inside the postcard (Snow) you can add a second message.
2. In the Style tab, drag the say block to after the show sprite block.
3. Write the message that will appear inside the postcard.
4. In the Style tab, drag the clear print boxes block twice. Place after the block When open postcard is received and When close postcard is received.
Add sound
We can also add sound to the postcard 🎶.
Follow these steps:
Click on the edit pencil of the sprite inside the postcard (Snow).
Click on the Sounds tab.
Choose a sound.
Click on Confirm.
In the Sounds tab, choose the block that play the audio and place it after the block when you open the postcard.
Program animations
In addition to programming the sprites on the cover and inside the card, you can also program other animations like snow falling.
Create or edit a sprite and select the following skins: Snow 1, Snow 2 and Snow 3. (There are other sets of sprites you can choose from).
In the Events tab, drag the block when open postcard is received.
In the Control tab, drag a block that repeat 0 times and another that wait 1 sec into the block when postcard is received. The wait block must be inside the repeat.
On the Style tab, dragging a block changes it to the next skin after the 1 sec wait block.
Change the block values to repeats 10 times and waits 0.2 sec.
To make the Snow fall while the animation runs, you can make it slide until it reaches the center of the postcard:
6. Use the first block when the postcard is received that you programmed (or a new one, but you can't use the same one from the animation because we want the actions to happen at the same time).
7. In the Movements tab, drag the block go to x and y into the block when postcard is received.
8. Change the values to the coordinates where you want the animation to start. For example x:410 y:460.
9. In the Movements tab, drag the block glide to x and y in 0 seconds to the end of the block when postcard is received.
10. Change the values to the coordinates where you want the animation to end. For example x:450 y:380.
11. Change the seconds value to 2.
Don't forget that you need two of the same messages to open a postcard so that the slide animation and skin change occur at the same time.
Click on Run ▶︎ and try the postcard.
Now that you know how to make a postcard, try changing or adding things. Make it unique!
When you've finished, you can share your postcard with your friends or family, for example via email. Find out how you can share it here.