Game Development Reference
In-Depth Information
These enemies will spawn a bit slower and in smaller groups than the red enemies. With
a small addiion to the script, they also have a very diferent movement patern. The blue
enemies will start moving at different angles. This makes them spread out as they advance.
The yellow enemy will also take the red enemy script as a basis. To make this enemy move
even more erraically, we will place a turn command inside the clones instead of placing it
inside the original sprite.
We will focus our atenion on the clone script irst.
1. At the start of the repeat unil () block, place a turn <clockwise> block.
2. Now we drag the pick random () to () block, which contains the values -30 to 30
respecively, from the point in direcion () block in the <green lag> script to the
newly created turn block inside the clone script.
3. Change the numbers to -10 and 10 to decrease the angle variaion.
4. In the <green lag> script, we will also change the number of repeats and the
wait ime just like we did for the blue sprite.
5. Also, remove the remains of the calculaion we plundered and make sure the
sprite iniially points to -90 (left) degrees.
Also, change the movement speed in the clone script from 5 to 4 .
The following screenshot shows the final scripts:
Search WWH ::

Custom Search