When shooting a weapon until empty there is always automatically script called from the NoAmmo state to reload the weapon:
https://github.com/GarageGames/Torque3D ... er.cs#L477
https://github.com/GarageGames/Torque3D ... on.cs#L381
And if this one does not execute the ammo display gets removed from the Gui.
I want to change the system that it only reloads when the reload button is pressed or maybe add a $pref variable that sets auto reload on or off and that the ammo counter stays displayed, even if it is 0 / 0.
Any ideas how that works?
This is question mainly because I use an iron sight script, that allows to aim down sights, this gets problematic in combination with the forced auto reload, since if you cancel the reload script and sequence through aiming or cancel to aim, then it leaves the weapon in limbo with an empty ammo display, but you can play the shoot animation, but without actually shooting.
So ideally I want to remove the forced reset of the ammo counter and display the ammo all the time, even if it is 0 and only to reload when reload is pressed, I hope someone understands what I want.
You can simulate the problem by commenting out "stateScript = "onClipEmpty";" so it does not automatically reload on noAmmo.