Navigation
API > API/Runtime > API/Runtime/Engine > API/Runtime/Engine/UGameplayStatics
Description
Hurt locally authoritative actors within the radius. Will only hit components that block the Visibility channel.
| Name | ApplyRadialDamage |
| Type | function |
| Header File | /Engine/Source/Runtime/Engine/Classes/Kismet/GameplayStatics.h |
| Include Path | #include "Kismet/GameplayStatics.h" |
| Source | /Engine/Source/Runtime/Engine/Private/GameplayStatics.cpp |
UFUNCTION (BlueprintCallable, BlueprintAuthorityOnly, Category="Game|Damage",
Meta=(WorldContext="WorldContextObject", AutoCreateRefTerm="IgnoreActors"))
static bool ApplyRadialDamage
(
const UObject * WorldContextObject,
float BaseDamage,
const FVector & Origin,
float DamageRadius,
TSubclassOf < class UDamageType > DamageTypeClass,
const TArray < AActor * > & IgnoreActors,
AActor * DamageCauser,
AController * InstigatedByController,
bool bDoFullDamage,
ECollisionChannel DamagePreventionChannel
)
true if damage was applied to at least one actor.
Parameters
| Name | Remarks |
|---|---|
| BaseDamage | The base damage to apply, i.e. the damage at the origin. |
| Origin | Epicenter of the damage area. |
| DamageRadius | Radius of the damage area, from Origin |
| DamageTypeClass | Class that describes the damage that was done. |
| IgnoreActors | List of Actors to ignore |
| DamageCauser | Actor that actually caused the damage (e.g. the grenade that exploded). This actor will not be damaged and it will not block damage. |
| InstigatedByController | Controller that was responsible for causing this damage (e.g. player who threw the grenade) |
| bFullDamage | if true, damage not scaled based on distance from Origin |
| DamagePreventionChannel | Damage will not be applied to victim if there is something between the origin and the victim which blocks traces on this channel |