I would like to make a logic that the game cannot hold the button, because when I hold the “shoot” button the animation remains frozen and if I release it goes back to normal and I want to prevent the player from holding the button
I’m just gonna code this out real quick. If you understand it, well done.
Weapon Blueprint
----------------
bool bTriggerHeld = false (so we are always aware whether the trigger is held or not)
Fire_OnPressed [from Character] -> Press Trigger
Fire_OnRelease [from Character] -> Release Trigger
Release Trigger:
bTriggerHeld = false
Press Trigger:
bTriggerHeld = true
if (FullAuto)
FireFullAuto
else
FireSingle
ReleaseTrigger
FireFullAuto: if (bTriggerHeld) (before firing, check if the trigger is still held)
Fire (the actual fire operation)
Delay(FireDelay) (respects fire rate delay)
FireFullAuto (keeps looping FireFullAuto)
FireSingle: if (bTriggerHeld)
Fire