58 — BP_EnemyBase
Blueprint Spec — UE 5.5–5.7
Parent Class
Character
Dependencies
Purpose
Base enemy character blueprint. Provides movement, animation, damage reaction, ragdoll, and interaction with the AI controller system. Designed to be extended for specific enemy types (humanoid, creature, drone). All AI logic is in the controller; the pawn provides physical representation and animation state.
Variables
| Name |
Type |
Description |
AIProfile |
DA_AIProfile |
Enemy configuration asset |
HealthComponent |
BPC_HealthComponent |
Health pool |
StaminaComponent |
BPC_StaminaComponent |
Stamina for actions |
PatrolPathRef |
BP_PatrolPath |
Assigned patrol route |
SkeletalMesh |
USkeletalMeshComponent |
Visual mesh |
AnimationBP |
UAnimInstance |
Animation blueprint instance |
WeakSpotComponents |
Array |
Weak point references |
bIsStaggered |
Bool |
Hit reaction state |
bIsRagdoll |
Bool |
Death ragdoll state |
RagdollLifetime |
Float |
Seconds before ragdoll cleanup |
LootTable |
TArray |
Dropped items on death |
AlertColor |
FLinearColor |
VFX color matching alert level |
FootstepSounds |
TMap<UPhysicalMaterial, USoundBase> |
Surface-based footsteps |
EnemyTypeTag |
FGameplayTag |
e.g. Tag.Enemy.Humanoid |
Structs
| Struct |
Fields |
Description |
FLootEntry |
ItemTag: FGameplayTag, DropChance: Float, MinCount: Int, MaxCount: Int |
Loot definition |
FWeakSpot |
BoneName: FName, DamageMultiplier: Float, bDestroyed: Bool, HitVFX: UParticleSystem |
Weak point data |
Functions
| Name |
Inputs |
Outputs |
Description |
InitializeEnemy |
Profile: DA_AIProfile |
— |
Set stats, components, attachment |
OnTakeDamage |
DamageResult: FDamageResult |
— |
React to damage (stagger, VFX) |
OnDeath |
— |
— |
Play death anim or ragdoll |
StartRagdoll |
HitLocation: FVector, Impulse: FVector |
— |
Physics death |
EndRagdoll |
— |
— |
Cleanup and destroy |
SpawnLoot |
— |
— |
Drop items at death location |
GetWeakSpotMultiplier |
BoneName: FName |
Float |
Return damage multiplier |
SetEnemyState |
NewState: EAIState |
— |
Update animation state |
PlayFootstep |
Surface: UPhysicalMaterial |
— |
Footstep sound |
GetEyeLocation |
— |
FVector |
Perception reference point |
CanBeStaggered |
— |
Bool |
Stagger immunity check |
PlayStaggerAnimation |
— |
— |
Hit reaction montage |
OnStaggerEnd |
— |
— |
Return to normal state |
SetVisibilityBasedAnimTickOption |
Option: EVisibilityBasedAnimTickOption |
— |
Performance culling |
Enums
| Enum |
Values |
Description |
EEnemyArchetype |
Humanoid, Creature, Drone, Turret, Boss |
Enemy structural type |
EHitReactionType |
None, Flinch, Stagger, Knockback, Launch |
Reaction severity |
Blueprint Flow
Animation State Mapping
| EAIState |
Animation State |
Notes |
| Idle |
Idle |
Standing, breathing |
| Patrol |
Walk |
Speed from profile |
| Suspicious |
Walk (slower) |
Looking around |
| Alerted |
Walk (fast) |
Ready stance |
| Combat |
Run / Jog |
Sprint toward target |
| Searching |
Walk (scanning) |
Head-turning |
| Fleeing |
Sprint |
Panic movement |
| Disabled |
Stagger / Stun |
Hit reaction or downed |
Communications With
Reuse Notes
- Subclass for different enemy visuals, hitbox setups, and animation sets
- Weak spots defined per blueprint (head, back weak point, glowing core)
- Loot table data-driven: design new enemies by swapping DA_AIProfile
- Ragdoll vs death animation toggle per enemy type
- AnimBP queries AIState for state-driven animation