Skip to content

Add an overlay state

An overlay state is an Anim Blueprint that provides a pose for the overlay layer. This tutorial covers three cases:

  1. Look at the Injured stance (a complete stance overlay that ships with the plugin): the quickest way to learn the pose Anim Blueprint.
  2. Add a new stance to the overlay pose menu (for example Wounded Arm).
  3. Add a body style to the overlay body menu.

For an item pose (something held, spawned by the equipment system), see Add an equipment item; the pose Anim Blueprint part is the same as here.

Background: Overlay system.

You need: pose animations on the UEFN mannequin skeleton (SK_UEFN_Mannequin): one standing and one crouched pose for a stance, plus ready and aim poses for an item.

The pose Anim Blueprint in short

Every pose overlay is a child of ABP_OverlayPose_Base with only class defaults set:

  • Pose variables (Stand_Relax_Idle, Stand_Ready_Walk, Crouch_Aim_Move...): each has an Overlay Pose (the animation) and a Curve Map.
  • Can Aim: whether the Ready and Aiming states are used.
  • Aim sweeps (Stand_Aim_Sweep, Crouch_Aim_Sweep) for items that aim.
  • Aim Sweep Interp Speed Local / Remote: 0 / 10 (0 = the owning player's arms follow the camera exactly).

The Anim Blueprint plays the first frame of each pose animation as a still pose, so single-frame animations of the character holding the pose are enough. The curve map says which body parts take the pose (see Curves).

1. Look at the Injured stance

ABP_Overlay_Injured (one hand held to the side) and ABP_Overlay_HandsTied (hands behind the back) are complete stance overlays. Open one to see how a stance is set up:

  1. Open /GASPALS/Systems/OverlaySystem/OverlayPose/Injured/ABP_Overlay_Injured and click Class Defaults in the toolbar.
  2. Under Overlay > Poses > Stand, Stand Relax Idle has its Overlay Pose set to Pose_Injured_Stand, and so do Stand Relax Walk, Stand Relax Run and Stand Relax Sprint (one pose can serve every speed).
  3. Under Overlay > Poses > Crouch, Crouch Relax Idle and Crouch Relax Move use Pose_Injured_Crouch. The Ready and Aim variables stay empty: a stance never uses them.
  4. Each Curve Map uses the same values as the poses in ABP_Overlay_Box. They take the whole body, legs included, and keep some locomotion motion on top:

    Curve Value
    layering_pelvis, layering_legs 1 (the pose's legs; 0 keeps the locomotion legs)
    layering_spine, layering_head 1
    layering_spine_add 1 (locomotion spine motion added on top)
    layering_head_add 0.5
    layering_arm_l, layering_arm_r 1
    layering_arm_l_ls, layering_arm_r_ls 1
    layering_hand_l, layering_hand_r 1

    The arm additives (layering_arm_l_add, layering_arm_r_add) and hand IK curves are not in the map, so they are 0: no arm swing, no hand IK. 5. Can Aim is off: the stance never goes to Ready or Aiming. 6. ABP_Overlay_HandsTied is set up the same way with Pose_HandsTied_Stand and Pose_HandsTied_Crouch. 7. Test: click Play, hold V, scroll the mouse wheel to Injured and release V. Walk, run, crouch (C). To experiment, stop Play, change the curves in the class defaults, compile, save and play again: lower layering_spine_add to make the torso stiffer, or set layering_legs and layering_pelvis to 0 to keep the locomotion legs.

Starting stance

Set Overlay Pose on the pawn's AC_OverlaySystem (Details panel, Overlay > Selection) to start in a stance. It shows while nothing is held; an equipped item's pose replaces it, and it comes back when the item is put away.

2. Add a new stance

  1. Animations. Author the stance poses (standing and crouched) on the UEFN mannequin (/GASPALS/Characters/UEFN_Mannequin/Meshes/SK_UEFN_Mannequin), or author them on your own skeleton and retarget them to the UEFN mannequin with an IK Retargeter (Export Animations in the retargeter).
  2. Anim Blueprint. Duplicate ABP_Overlay_Injured (a complete example, see part 1) into a new folder, for example OverlayPose/WoundedArm/ABP_Overlay_WoundedArm. In its Class Defaults, set the Overlay Pose of Stand Relax Idle / Walk / Run / Sprint to your standing pose and of Crouch Relax Idle / Move to your crouched pose, and adjust the curve maps. Compile and save.
  3. Enum. Open /GASPALS/Systems/OverlaySystem/OverlayPose/Enum_OverlayPose, click Add Enumerator and name it WoundedArm. Save. The menu lists the new entry automatically.
  4. Link it. Open /GASPALS/Systems/OverlaySystem/AC_OverlaySystem, click Class Defaults, and under Overlay > Selection add an element to Overlay Pose Layers: key WoundedArm, value ABP_Overlay_WoundedArm. No graph edit. Compile and save. The sample pawns' components use the class default map, so the row reaches both pawns; if your own pawn's AC_OverlaySystem overrides the map (a reset arrow next to it in the Details panel), add the row there too.
  5. Test. Click Play, hold V and pick WoundedArm: the pose shows and no orange warning appears. Walk, run and crouch, then press N to switch to the other pawn and test again. For multiplayer, run a listen server with a client (see Networking) and pick the stance on the client: both windows show it.

Stances and items share the layer

A stance from the overlay menu and an item from the equipment menu both link the same overlay pose layer, and the last one wins. If a stance must combine with items (an injured character holding a pistol), make it an item pose instead: an equipment data asset with the stance poses (see Add an equipment item).

3. Add a body style

  1. Animations. Author a standing and a crouched body pose on the UEFN mannequin, as for a stance.
  2. Duplicate /GASPALS/Systems/OverlaySystem/OverlayBody/Feminine/ABP_OverlayBody_Feminine into a new folder and name it, for example, ABP_OverlayBody_Heavy.
  3. In its Class Defaults, set Pose Stand Idle, Pose Stand Move, Pose Crouch Idle and Pose Crouch Move (the shipped styles use the standing pose for both standing entries and the crouched pose for both crouched ones). Compile and save.
  4. Open /GASPALS/Systems/OverlaySystem/OverlayBody/Enum_OverlayBody, click Add Enumerator and name it Heavy. Save.
  5. In the Class Defaults of AC_OverlaySystem, add an element to Overlay Body Layers: key Heavy, value ABP_OverlayBody_Heavy. Compile and save.
  6. Test. Click Play, hold B and pick Heavy. Stand and crouch, then press N and check the other pawn.

Tips

  • Ready and aim poses for items: hold the weapon raised (Ready) and at the eye (Aim). Set Can Aim on. The state machine uses Ready after aiming and drops to Relaxed after Ready Hold Time Idle / Moving (3 / 2 s).
  • Aim sweeps: copy the format of OverlayPose/Rifle/AO_Rifle_Stand_Sweep: a 1-second animation aiming straight up at the start, level in the middle and straight down at the end, with Additive Anim Type Mesh Space and Base Pose Type Selected animation frame (the middle frame).
  • Hand IK: set enable_handik_l (or _r) to 1 in the poses where the support hand holds the item, and add a HandIK socket on the item.
  • New settings on the base: if you add a variable to ABP_OverlayPose_Base, existing children keep their own class defaults (empty or 0). Set the value on every child.
  • Warning on screen (OverlayPoseLayers has no anim layer class...): the value has no row in the map, or its row has no class; see Troubleshooting.