Step 7 – Special Attack

Setting Up The Attack

  • Make the “specialAttack” function. The first thing inside should be a blank sprite called “blast” of kind “Projectile” to set up our attack sprite for a cool animation!
  • Since it’s a super powerful attack, it’s not quite as accurate as our basic attacks, meaning it’s more likely to miss. So we set our odds at “65% chance” and “35% chance”.
  • Also, because we are using a sprite, we have to tell it where to start on our screen. This is based on the center of the sprite. So we use the Sprites block “set blast position to x 50 y 40”.
  • Because it’s so powerful, we will change how much life player 2 loses when it hits. This is supposed to be a “high risk, high reward” attack so the numbers should be far apart.
  • Don’t forget to add the long text to let us know what happened!
  • Animating the Attack Sprite

  • The animation is up to you. Whether it should travel from your sprite to other, or however you want to do it. It’s important to pay attention to the number of frames and how long the animation is. This gif will give a simple demonstration on how it works.