[SOLVED] Flamethrower Help Please

How do I make a flamethrower or something that breaths fire in one direction?

Get an animated flamethrower image (ideally have it so it faces to the right), create it via events action and rotate it to where you want it to face.

Hi, depending on the style of the game a particle emitter with a hidden sprite or a raycast for collision might work as well.


A little more context would be nice, but if I understood you right you want to do something like this: (It’s as simple as can be, you create a Fire object at the desired position with a cooldown, and move it at any angle and speed you need. Also, I’m using a little 6-frame animation for deleting an object, the length of this animation determines a lifetime of an object)

And the result looks like this:

The flamethrower is for a enemy not for the player, how would I do that?

if player distance to enemy = ____ px
change spotted variable of enemy to true
if spotted variable of enemy is true
create flame
add a force towards player

Thank you for you all´s help.