Game Development Reference
In-Depth Information
The finished script will look like the following screenshot:
This game isn't much of a challenge if the boss can't hit the player back. So, we will add a
small script that ends the game when the player collides with the boss sprite as follows:
1. We click on the Diver sprite in the Sprites library to see its script.
2. Noice that we already created a hit condiion for touching the Starfish sprite
using the touching block. We just need to add one more touch condiion.
3. We grab an or operator and a touching <Gobo> block.
4.
Place the new touching block in the right slot of the operator.
5. Then place the enire earlier construcion in the let slot.
6. Now we place this string of four touch condiions in the repeat unil condiion slot.
That's all that we need to do to add a collision effect with the boss to the game.
 
Search WWH ::




Custom Search