box-openDrop Magazine (AN_TFA_DropMagazine)

Spawns and drops a magazine during reload animations.

Asset path: /Game/InfimaGames/TacticalFPSAnimations/Common/Core/Animation/AN_TFA_DropMagazine

AN_TFA_DropMagazine is the notify you place on the exact frame where the current magazine should leave the weapon during a reload or similar animation. It is a weapon-owned notify, so it only does useful work when the montage is playing on a mesh owned by BP_TFA_BaseWeapon.


Quick Navigation



Purpose


Typical use:

  • Reload montages in first person or third person


Owner Requirement


This notify only works when the active animation is playing on a mesh owned by BP_TFA_BaseWeapon.


Notify Blueprint Flow


This notify is implemented in Received_Notify. It gets MeshComp.GetOwner(), casts the result to BP_TFA_BaseWeapon, validates the weapon, and then calls Weapon.SpawnDroppedMagazine(ImpulseForce, RotationForce). If the cast fails, nothing happens.

circle-info

This notify does not spawn the magazine directly. It delegates the actual work to BP_TFA_BaseWeapon::SpawnDroppedMagazine.

Readable Blueprint Flow


Parameters


The notify exposes two parameters:

  • ImpulseForce

    • Passed into SpawnDroppedMagazine as the linear impulse strength

  • RotationForce

    • Passed into SpawnDroppedMagazine as the spin strength

Default Values

  • ImpulseForce = -50.0

  • RotationForce = 150.0

circle-info

The negative default on ImpulseForce is intentional. The weapon applies impulse along the socket up vector, so a negative value pushes in the opposite direction.

circle-exclamation

What SpawnDroppedMagazine Does


BP_TFA_BaseWeapon::SpawnDroppedMagazine creates a physics magazine actor at the weapon’s magazine socket and fills in the rest from CurrentConfig.

It uses config data for:

  • The socket to spawn from

  • The static mesh to assign

  • The impact sound to use on collision

Spawn Location

  • Component: SK_Receiver

  • Socket: CurrentConfig.SocketMagazineAttachment

  • Transform: SK_Receiver.GetSocketTransform(SocketMagazineAttachment, RTS_World)

circle-exclamation

Spawned Actor and Runtime Setup

  • Class: BP_TFA_PhysicsMagazine

  • Collision handling: AlwaysSpawn

  • Assigned sound: CurrentConfig.SoundCue_WEP_MagDrop

  • Assigned mesh: SM_PshyicsObject.SetStaticMesh(CurrentConfig.MeshMagazine)

Physics Kick

  • Linear impulse uses the socket up vector multiplied by ImpulseForce

  • Angular impulse uses RandomUnitVector() multiplied by RotationForce

  • Both are applied with bVelChange = true

chevron-rightConfig Fields Usedhashtag

Values come from CurrentConfig (BP_TFA_BaseConfig):

  • SocketMagazineAttachment

  • MeshMagazine

  • SoundCue_WEP_MagDrop


Placement Tips


  • Place the notify on the exact frame where the magazine clears the magwell

  • Put it on the montage that plays on the weapon mesh

  • If your reload logic moved to the character mesh, this weapon-owned notify will not execute its intended code path


Troubleshooting


  • Nothing happens

    • The animation is playing on a mesh that is not owned by BP_TFA_BaseWeapon

    • The weapon does not implement SpawnDroppedMagazine, or it exits early

  • The magazine drops, but looks wrong

    • Tune ImpulseForce and RotationForce

    • Verify CurrentConfig.SocketMagazineAttachment exists on SK_Receiver

    • Verify CurrentConfig.MeshMagazine is set

    • Verify CurrentConfig.SoundCue_WEP_MagDrop is set if you want impact audio



Last updated

Was this helpful?