Duion Posted March 13, 2016 Share Posted March 13, 2016 When shooting a weapon until empty there is always automatically script called from the NoAmmo state to reload the weapon: From here https://github.com/GarageGames/Torque3D/blob/development/Templates/Full/game/art/datablocks/weapons/Lurker.cs#L477 to https://github.com/GarageGames/Torque3D/blob/development/Templates/Full/game/scripts/server/weapon.cs#L381And 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. Quote Link to comment Share on other sites More sharing options...
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.