Step 5: Change Costume for Hit 3

Goal:


Let’s copy the previous two steps so that the ship’s costume is changing four times when it gets hit.

All these costume changes make the ship look like it is flashing when it gets hit.

This code will only run when an asteroid collides into the ship and then broadcast the Hit1 message.

Steps:

  1. From Look, place a switch costume block and set it to Ship2.
  2. From Control, place a wait block and set it to .1sec.
  3. From Look, place a switch costume block and set it to Ship.

Code: