Stationary cannon example

I did this one quickly as a proof of concept for a boss battle in my bigger projects. Some ideas I had were: you get just 5 bombs and when you run out you have to get more and bring them back to the cannon. Obviously only shoot one at a time. Maybe make it a bit easier. The timer extension made this a cinch as I made the delay to shoot the same as the animation for the cannon. (Go close to cannon and press A to shoot)

1 Like

Is it possible to allow the cannon to be activated when you reach a certain distance? Cause I wanted to make a mechanic in my game where if you are a certain distance between an enemy and you press a button combo, you will damage the enemy and push them back. I know there is a block in the Sprite Util extension called the ‘distance between [mysprite] and [mysprite2]’, but I don’t exactly get how to use it.

Use “if (distance between [mysprite] and [mysprite2]) (</=/>…) (number of pixels) then (blocks that you want to be activated)” Image so you aren’t too confused:

Yes, I tried it. Works pretty good. I used 16 pixels as 8 seemed too little. I moved the overlap code to the b button and put the distance between on the a button…

thank you