User Guide

126
1. Create an if block that reads if costume # < 5. Then
duplicate it.
2. Drag one of the if blocks directly underneath the
repeat until Defeated = 1 block, so that it is inside
the loop and surrounds the other blocks in the loop.
3. Drag the other if block directly underneath the
repeat 4 block, so that it is inside the loop and
surrounds all of the other blocks in the loop.
4. Add a wait 0.1 secs to the bottom – inside the
repeat until Defeated = 1 block but underneath
the if costume # < 5 block.
To detect when the enemy is defeated and reactivate scrolling,
create these blocks underneath the switch costume to Williams-
1 block in the when Z key pressed script.
The final block moves the sprite to a known location off the
Stage – this is to allow the script that re-orders the sprite layers
to remove “dead” sprites from the Mobs list. You need to add a
few blocks for this to happen. Select the Stage in the Sprite List,