Step 3

Shooting


In this next step we are going to create a projectile that flys towards our aim!

Create a on B button pressed block.

Set up the values as the image on the right and name the variable ‘projectile‘.

For the image sprite draw a small black circle any way you want.

Finish the button


These next block will allow the projectile to follow your aim.

We add a pause for 200ms to allow the projectile to follow the aim then target another sprite that is no long on the screen. This allows it to continue its path and not follow the aim all the time.

Test your button


Check the projectiles in your game our following the aim!