[SOLVED] Double bullet when my player is walking

I shoot once every time I press the space bar. When my player is not moving it works ok, but when I’m walking, visually I can see 2 bullets together because of the cam movement. How can I fix that please?

Are you using the Fire Bullet Behavior? Because it depends. For me, When I use the Fire Bullet extension, It works.

No. I’m using force. Bullet behavior does the same.

When you move, are you moving the centering the camera on the player? And if so, is the centering of the camera the very last thing of all the events, after all the scenen objects have been moved? Because I’m wondering if the bullet is ghosting.

Centering the cam on my player is my last action.

Can you post the events?

And are the 2 bullets you can see along the same line as the player movement? So if you move left to right are the bullets in line horizontally, and if you move diagonally that they too appear diagonally in line with the player’s movement direction?

Your first 2 screen shots are of the same events.

I just replaced them.
My player only move in 4 directions. Right, Left, Up, Down. All of them the bullet doubles.

If you notice, I had to change the point where my bullet is created when I’m walking, because when I’m moving, it’s being created behind me.

Nothing obvious jumps out, and so I’m wondering if it’s the order of events causing the double bullets. Could you try swapping the firing and moving sections around, so that you check for movement first and set the animations accordingly, and then action the space bar press?

So effectively swapping the “Space key is pressed” event (and its subevents) with the “Move timer > 0.1 seconds” event and its subevents?

And if that fails, any chance of a short video or a screen shot to show the double bullets? It could be that what I’m visualising is not be what happens.

I’ll try that and post the answer. Thanks for now!


I tried to swap the events as you suggested, but it doesn’t work.

Why do you have 2 timers for the firing events? From the video you’ve posted, it looks like there are double bullets happening when you change from standing to moving - you use X(“bala”), and others you use X(), and this would account for the different heights of the bullets, and points to the firing happening twice in quick succession.

So, can you just use one timer for firing?

Also, what are the animation numbers for each animation name?

It was a test. I thought the difference of distance from standing and walking was causing the problem, so I increased the time for each animation. The same way, I used X(“bala”) and X() because when I’m walking the bullets were being creating behind me because of my movement, but if I use 1 timer and 1 position for all, the problem persists.
4- back
5 - walking_back


This is my game with only 1 timer and X(), Y() positions in all events.

Put your bullet events after your move events.

They are already after my move events.
I think I know what happens. When I’m moving, my position is reaching my last bullet, so it"s creating the bullet closer to the previous one. What do you think?

In your screenshot the bullet events are before your movement

And Yes, a bullet fired from move will get closer to a bullet fired while standing

But it should be spaced evenly while moving.