Back to search
PatternGold tierHealth

Health system: take damage, clamp health, check death

Updated 6mo ago7 look-ups
UE 5.3UE 5.4UE 5.5UE 5.6UE 5.7#health#damage#death#clamp#variable

Reference

Pattern: EventAnyDamage → Subtract_FloatFloat(A=CurrentHealth, B=Damage) → Clamp(Value=Result, Min=0, Max=MaxHealth) → SetVariable(Health=ClampResult) → Branch(Condition=(Health <= 0)) → True: call OnDeath custom event. Variables needed: Health (float), MaxHealth (float). EventAnyDamage output pin is 'Damage' (float). Clamp inputs: 'Value', 'Min', 'Max'. All floats.