Fire Bullet Extensions 2 bugs

1st bug is more of feature that is causing some unwanted behavior
You can’t set in behavior how many ammo units are subtracted from ammo count when firing
So if you fire more than 1 bullet like idk 5 then it still subtract only 1 ammo unit
Half solution and bug as i would call it is to add increase ammo action when player fires
And in this case just set it to -4
This way 5 ammo units are subtracted when firing 5 bullets
And the bug is that IF you print your current ammo to text or to variable and that to text
It will FIRST subtract 1 ammo unit then 4 instead of 5 at the same time
Making it so the number of your ammo do exactly that 1st subtract 1 and then 4 which is looking like a bug
If there was in behavior option to either set how much ammo units to subtract OR subtract as much ammo units as bullets you fire the problem would not exist
As for now i solved it by simply editing extension changing ammo subtraction to 0 and setting how much ammo to subtract with increase ammo action
And here a little gif to demonstrate the issue
I am firing 10 bullets it subtracts 1 ammo and i subtract 9 via action to in total lose 10 ammo per shot fired
2023-03-19_23_09_Q6czscXS0w_GDevelop
You can clearly see 1 on the end sometimes where it should only show 0 all the time
And how it looks if i modify extension to subtract 0 and in action increase ammo per shot to -10
2023-03-19_23_12_kXcxX0DzHn_GDevelop

Bug 2
IF you add gun like pistol/revolver to your project
You set origin and center point on handle while bullet spawn point in front of barrel like on screenshot below

Then bullets fired toward MouseX and Y or CursorX and Y will go as much higher or lower on Y
As much bullet spawn point is away from center point
Well if center point would be in center and bullet spawn point (BulletPoint) would still be higher like 7 pixels from it
Then all bullets will fly 7 pixels away from mouse position

It is always exact same amount and + or - value as position of bullet spawn point is in relation to center point

2023-03-19_23_19_2oUAD6oWaB_GDevelop

You can test it here
https://games.gdevelop-app.com/game-9b355e46-7484-4fce-855f-2f459e47d8d2/index.html

And here are events in case by any chance i may be doing something wrong

And yes if i set center point to be on same Y as bullet spawn point or vice-versa bullet spawn to be same Y as center point
Bullets fly perfectly trough center of cursor

2023-03-19_23_40_PnynJoUhXL_GDevelop

1 Like