2_player_preview-2.gif

You can also create games for two people by using the multy touch screen of your phone. The person who taps faster on the button, wins the race. Let’s play!

What bricks and objects do you need?

Create a new program and add the following objects from the media library:

preview_object.jpg

Now add these scripts to the move button 1 object:

1. Step

button1_object.png

Position the first button in the upper left corner. Also set the size to a value you like.

button1_1.png

2. Step

If the button is tapped by the first player, the button sends the message “move1” to all other objects. Only rabbit 1 will react to this message.

button1_2.png

Now add these scripts to the move button 2 object:

3. Step

button2_object.png

Now add the object move button 2 for the second player. Position it in the upper right corner of your screen.

button2_1.png

4. Step

When the move button 2 object is tapped, the message “move2” will be sent to all objects but only rabbit 2 will react to this message.

button2_2.png

Now add these scripts to the Rabbit 1 object:

5. Step

rabbit1_object.png

Download these two looks from the media library.

rabbit_looks.png

6. Step

First position rabbit 1 in the lower left corner.

rabbit1_1.png

7. Step

When the first button is tapped, the “move1” message is sent. If this happens rabbit 1 should react. The when you receive-brick allows you to communicate between objects. Now rabbit 1 changes it y-value by 20 and switches to its next look.

rabbit1_2.png

Now add these scripts to the Rabbit 2 object:

8. Step

rabbit2_object.png

Download these two looks from the media library.

rabbit_looks.png

9. Step

Similar to rabbit 1, position rabbit 2 in the lower right corner. Additionaly change the color for a different appearance.

rabbit2_1.png

10. Step

Only when move button 2 is tapped and than the message “move2” is sent, the rabbit 2 changes it´s y-value and takes the next look.

rabbit2_2.png

Now add these scripts to the goal line object:

11. Step

goalline_object.png

The object goal line needs three different looks. One look is for the goal line itself and the other two looks are for the winning screen of the game. Draw these looks with Pocket Paint. You can additionaly use images from the media library.

goalline_looks.png

goalline_win1.pnggoalline_win2.pnggoalline_line.png

12. Step

When rabbit 2 touches the goal line, set the you win rabbit 2 look.

goalline_1.png

13. Step

On the other side when rabbit 1 touches the goal line, the object should take the other win look.

goalline_2.png