APawn::ShouldTakeDamage

Return true if we are in a state to take damage (checked at the start of TakeDamage. Subclasses may check this as well if they override TakeDamage and don't want to potentially trigger TakeDamage actions by checking if it returns zero in the super class.

Windows
MacOS
Linux

References

Module

Engine

Header

/Engine/Source/Runtime/Engine/Classes/GameFramework/Pawn.h

Include

#include "GameFramework/Pawn.h"

Source

/Engine/Source/Runtime/Engine/Private/Pawn.cpp

Syntax

virtual bool ShouldTakeDamage
(
    float Damage,
    FDamageEvent const & DamageEvent,
    AController * EventInstigator,
    AActor * DamageCauser
) const

Remarks

Return true if we are in a state to take damage (checked at the start of TakeDamage. Subclasses may check this as well if they override TakeDamage and don't want to potentially trigger TakeDamage actions by checking if it returns zero in the super class.

Help shape the future of Unreal Engine documentation! Tell us how we're doing so we can serve you better.
Take our survey
Dismiss