Fire and Reload abilities are granted through an Ability Set inside the Lyra Equipment Definition (ULyraEquipmentDefinition) class when the associated weapon is picked up. The activation requirements are handled by the ULyraGameplayAbility_RangedWeapon class, and the targeting logic is done in C++ by the same class. The Weapon Fire Gameplay Ability is activated by the tag InputTag.Weapon.FireAuto (input binding) and the Input.Weapon.Fire tag (gameplay event). It is Inhibited by the Ability.Weapon.NoFiring tag that is set from the reload ability, if the magazine is empty. The Asset Tag of Ability.Type.Action.WeaponFire grants the Event.Movement.WeaponFire tag. While the tag is active the On Ability Added event will set up a listener for the Ability.PlayMontageOnActivateFail.Message tag. This event is triggered when the player attempts to fire the weapon while no ammo is left. When the message is received, it plays a failed to fire montage (dry fire). This montage is only played if the player is still alive, and the animation will only be retriggered if a set amount of time has elapsed to prevent animation spamming. When On Activation is called, If the character is locally controlled, it will perform native targeting traces and builds the targeting data in the following order: Ability costs (ammo consumption) are committed natively. The targeting data is network predicted and sent to the server, where it's validated and confirmed by the ULyraWeaponStateComponent. If the targeting data is confirmed by the server, then the BP event OnRangedWeaponTargetDataReady is called, passing all found targets. This allows the ability to apply damage, play hit effects. Plays the firing Animation montage. Sets a timer to Fire Delay, which is the effective delay between shots. When Fire Delay or the timer finishes, ends the ability. Additional firing attempts are handled by the activation logic. On Ranged Weapon Target Data Ready Is Called from C++ when all targets hit by the weapon are validated. This triggers the Firing gameplay cue on the weapon's owner, which then passes the first hit as a parameter. The cue Iterates through all targets hit, playing impact gameplay cues on each target location. If the ability has authority (is executed on the server), it applies the damage Gameplay Effect on each target hit.