Step 8: Pikachu Reset Pokeball Code

Goal:


Now that we have a game over message that appears when we lose, we need to tell the pokeball what do after it huts Pikachu and the Pikachu is still alive.

We do this by telling the pikachu to lose a certain amount of health every time it comes into contact with the pokeball.

Steps:

  1. From Pokeball, place a MoveTo block after the IF/THEN block.
  2. From Canvas, attach a Canvas.Width block into the x slot of the MoveTo block.
  3. From Canvas, attach a Canvas.Height block into the y slot of the MoveTo block.

Code: