[Solved] Bullet Counter problem

I am using the fire bullet extension and would like a counter to start at ten and end on zero when the bullets have run out but I am having trouble with the events.

I tried using an image of a bullet in GUI but when the fire button was pressed the images representing the bullets were deleted before the bullets were fired.

Also the number keeps going down into minus numbers.

This is my events for the bullet and counter.

I sorted out the problem with the minus numbers by adding these events.

The problem is that the counter isn’t in sync with the bullets. What I would like to happen is the number only goes down when a bullet is created.

Is this possible and how?

thanks

No need to use a variable to keep track of the number of bullets remaining. Set shots per reload to 10 in the FireBullet configuration:

image

Then use the following to fire bullets. Once 10 bullets have been fired, no more can be shot until a reload:

1 Like

Thank you works brilliantly a lot easier than trying to create a variable.