Problem with Player Bullets

Hello, can somebody help me please?
My character in my game can shoot bullets. I have added a point to his shooting animation where the bullets come from. When the bullets are created, they are supposed to fly forward. I have my event that tells the bullets to move in one direction when the button is pressed, and another that tells the bullets to move in the opposite direction if the character is flipped.
However, when the character is facing the right, the bullets fly behind him (Event adds a permanent force of 180 at 200 speed). When the character is facing the left, the bullets don’t move at all (Event adds a permanent force of 360 at 200 speed).
I tried to fix this, but my solutions seem to only make it worse, such as having ALL the bullets move in one direction when the character flips.

Also, the “For Every Object” thing does not work, for it prevents the character from shooting at all. I’ve tried.

Any help is appreciated. Thank you. :slight_smile:

hi
if iam right suppose + is your Sprite East is 0 degrees, South is 90, West os 180 and north 270.
So if you apply 180 degress they go west if you xharacter is looking to the right it means they go tonthe left :slight_smile: l

Huh?? :confused: I’m sorry, but I don’t seem to understand…


taken from here
wiki.compilgames.net/doku.php/gd … s_concepts

GDevelop assumes an unflipped sprite is facing right, whereas flipping it means it faces left. In GD5 points get flipped too, but this wasn’t the case in GD4. It’s important that all the sprites have the “gun” point or the position the bullets are created will default to the origin of the sprite.

This setup should do what you want. Rather than using angles with the force, it uses a negative number for left movement and positive for right (‘Add a force’ action), which is easier to keep track of if the gun only shoots horizontally.

Thank you, it works now! :smiley: