I have a family of 'beam weapons' with a Bullet behaviour. When I use events to change the properties of this Bullet behaviour, it doesn't seem to set it correctly.
In this Platformer project the hero has four weapons to attack with. Using the WASD keys you can change between all of them. Everything looks right when the hero faces right, but when it faces left, something strange happens.
When I can, I'll add an attachment, but for now here's a guide of how to reproduce the bug.
- For better results, press the 'A' key to switch beam.
- Press the left arrow key so the player faces the left side of the screen.
- Press space bar once.
- When the "count" meter on the top-left side of the screen reads 0, press space bar once. After half of a second, press space bar once again.
The very first beam (the one spawned on Step 3, let's call it Beam 1) will move to the right. The first beam spawned on Step 4 -Beam 2- will move to the right as well. However, when the next beam is spawned (Beam 3), Beam 2 will start moving to the left, but Beam 3 will move to the right.
All of the three beams must always move to the left when the player faces the left side of the screen, and any beam shot when the player faces the right side of the screen must always move to the right.
How should I fix this?