Testing Dummy

Goal: drop a training dummy into a level that never dies, regenerates after you stop hitting it, and can be locked onto by the CrimsonCamera lock-on system. The C++ class ACrimsonTargetDummy ships with all three behaviors — you only author the data assets that give it a mesh and health, then place it.

Prerequisites
CrimsonCore installed per Integration. To test lock-on, a player pawn with a UCrimsonLockOnComponent and an assigned UCrimsonLockOnConfig (see the CrimsonCamera wiki). This page builds entirely from data assets — no C++.

What ships

PieceWhat it does
ACrimsonTargetDummyBlueprintable subclass of ACrimsonNPCBase. Refuses to die and regenerates on a timer. You place a Blueprint subclass of it.
Immortality (revive-on-death)Overrides OnDeathStarted to reset death state to NotDead and heal to full instead of dying. Damage still lands and the health bar drops, so you can read damage numbers.
Combat-pause regenA server-only timer heals PassiveRegenPercent of MaxHealth every PassiveRegenRate seconds, but only after RegenDelayAfterDamage seconds without taking damage.
Lock-on targetInherits a UCrimsonCoreLockOnTargetComponent from ACrimsonNPCBase, so it is a valid lock-on target once you author its lock points.
No ability set means 0 HP
Like every NPC, the dummy gets its UCrimsonHealthSet (and therefore MaxHealth) only from a UCrimsonAbilitySet. Skip step 1 and the regen has nothing to clamp to. See Character Pipeline for the underlying grant rule.

1. Create the ability set (grants health)

Content Browser → right-click → Miscellaneous → Data Asset → pick CrimsonAbilitySet. Name it DA_AbilitySet_Dummy. Under Granted Attributes, add one entry and set its base values:

text
DA_AbilitySet_Dummy
GrantedAttributes[0].AttributeSet = UCrimsonHealthSet
GrantedAttributes[0].DefaultValues[0].Attribute = UCrimsonHealthSet.MaxHealthBase
GrantedAttributes[0].DefaultValues[0].Value = 9999
GrantedAttributes[0].DefaultValues[1].Attribute = UCrimsonHealthSet.Health
GrantedAttributes[0].DefaultValues[1].Value = 9999
Verify
Set MaxHealthBase before Health in the array — order matters so the health component reads the correct cap on init. A high cap (9999) keeps the bar from emptying under heavy test damage.

2. Create the NPC data asset

Content Browser → Miscellaneous → Data Asset → pick Crimson NPC Data. Name it DA_NPCData_Dummy and set:

FieldValue
SkeletalMeshAny skeletal mesh, e.g. SKM_Manny_Simple. Its sockets become your lock-on points in step 4.
AnimInstanceAn anim blueprint for the mesh (e.g. ABP_Unarmed). Optional for a static dummy.
AbilitySetsAdd DA_AbilitySet_Dummy from step 1.
TeamTagsA team the player is hostile to (or neutral). The lock-on affiliation filter reads this — or use a lock-on config whose preset omits the affiliation filter.
Verify
AbilitySets contains DA_AbilitySet_Dummy. Without it the dummy spawns with 0 MaxHealth.

3. Create the dummy Blueprint

Content Browser → Blueprint Class → pick CrimsonTargetDummy as the parent. Name it BP_TargetDummy. Open it and set its Class Defaults:

PropertyCategoryValue
NPCDataCrimson|NPCDA_NPCData_Dummy from step 2.
PassiveRegenRateCrimson|DummySeconds between regen ticks. Default 1.0.
PassiveRegenPercentCrimson|DummyFraction of MaxHealth healed per tick (0-1). Default 0.1.
RegenDelayAfterDamageCrimson|DummySeconds without damage before regen resumes. Default 3.0; set 0 for constant regen.
Screenshot pendingImages/CrimsonCore/dummy-blueprint-defaults.png
BP_TargetDummy Class Defaults: NPCData assigned and the regen properties under the Crimson|Dummy category.
Verify
NPCData shows DA_NPCData_Dummy and the three regen properties are visible under Crimson|Dummy.

4. Author the lock-on points

In BP_TargetDummy, select the inherited LockOnTargetComponent in the Components panel. In its details, fill the Lock On Points array — one entry per socket you want to lock onto:

FieldPurpose
SocketNameA socket that exists on the mesh from step 2 (e.g. head, spine_03). Leave None to use the actor origin + the component's DefaultPointHeight.
DisplayNameOptional UI label shown when cycling lock points.
PriorityHigher = chosen as the default point when first locking on. Default 1.0.
Screenshot pendingImages/CrimsonCore/dummy-lock-on-points.png
LockOnTargetComponent details: Lock On Points array with head and chest sockets.
Verify
An empty array still works — the dummy falls back to a single origin point. Add explicit sockets to cycle between weak points.

5. Place it and test

Drag BP_TargetDummy into your test level. Because it sets NPCData in its defaults, it initializes itself on BeginPlay (server authority) — no spawner needed. Confirm your player's UCrimsonLockOnComponent has a UCrimsonLockOnConfig assigned, then play in editor.

Verify
Lock on → the reticle snaps to your highest-priority socket (cycle points if you authored several). Burst the dummy to 0 → it revives to full, never ragdolls. Deal sustained damage → health stays down while you keep hitting; stop → regen resumes after RegenDelayAfterDamage seconds. Set RegenDelayAfterDamage = 0 → regen is constant.
Placed vs spawned
ACrimsonTargetDummy::BeginPlay applies its NPCData on the server when it is set in the Blueprint defaults, and ACrimsonNPCBase replicates NPCData so remote clients mirror the mesh and bind the health component automatically. A placed dummy is therefore drag-and-drop and initializes correctly on server, listen-server, and dedicated-server clients. The UCrimsonEnemySpawnerSubsystem / CrimsonEnemySpawner path remains the production route for spawned, pooled, AI-driven enemies.

How immortality and regen work

OnDeathStarted is the health component's death hook. The dummy overrides it and deliberately does not call Super — instead it sets the death state back to NotDead and heals to full, so the death pipeline (ragdoll, messages, AI stop) never runs.

Regen is a server-only repeating timer started in BeginPlay. The dummy binds to UCrimsonHealthComponent::OnHealthChanged; any tick where the new value is lower than the old records the damage time. The regen tick heals only when RegenDelayAfterDamage seconds have passed since that timestamp (or when the delay is 0). All of it is guarded by HasAuthority().

See also

  • Character Pipeline — the NPC ability-set / attribute-grant rules this dummy relies on.
  • The CrimsonCamera wiki — setting up the player's lock-on component, config, and camera mode.
  • Source: Plugins/CrimsonCore/Source/CrimsonCore/Public/NPC/Enemies/CrimsonTargetDummy.h (+ matching .cpp under Private/NPC/Enemies/).