Game Development Reference
In-Depth Information
8. We close the script with a delete this clone block, which triggers after a clone is hit
by an explosion.
The scripts are now complete and the knight can wander about the maze looking for a
suspicious-looking cat.
Objective complete - mini debriefing
We added an enemy that behaves in the same way as the player character. Due to this,
we could reuse a lot of scripts, saving us some ime. We sill had to review each script to
make some changes and to check we didn't leave any unwanted behavior, like a knight
responding to the exit sprite.
Adding a ghost
Our next enemy will be quite different. It will be easier to script, but offers a bigger challenge
to the player. This enemy will be a ghost that is allowed to move through walls freely.
Therefore, it can pop up anywhere without restricions.
Prepare for lift off
We first load a ghost sprite from the Scratch library. To do this, we perform the following steps:
1. We click the Choose sprite from library icon.
2. The ghost is also in the Fantasy category, just like the knight.
3. There are two opions. We select Ghost2 , because it looks more scary.
 
Search WWH ::




Custom Search