Skip to main content

Kill Zone Component

Custom Icon
Base:
UActorComponent
Type:
UNKillZoneComponent
Header File:
NexusActorPools/Public/NKillZoneComponent.h

A kill plane implementation built to automatically pool properly configured AActor upon overlap.

UNKillZoneComponent

info

By default the component will automatically change its collision profile to OverlapAllDynamic.

Component Settings​

SettingTypeDescriptionDefault
Ignore Static ActorsboolIgnore static (Non-movable) actors that trigger an overlap event.true
Non-INActorPoolItem BehaviorENKillZoneBehaviorWhat should occur for an AActor that doesn't implement the INActorPoolItem interface and doesn't have an existing FNActorPool.ApplyFellOutOfWorld

Behaviors​

ValueBehavior
IgnoreLeave the AActor alone — no return, no destroy, no damage.
ReturnToActorPoolForce the AActor back to its FNActorPool (or destroy it if no pool exists).
ApplyFellOutOfWorldApply the world fall damage type to the AActor, matching engine kill-volume behavior. (default)

UFunctions​

The methods exposed to Blueprint.

Get Kill Count​

/**
* Gets the internal counter tracking the number of AActors the component has killed.
* @return The kill count.
*/
int32 GetKillCount() const { return KillCount; }

Set Kill Count​

/**
* Sets the internal counter tracking the number of AActors the component has killed.
* @param NewKillCount The new value to use as the kill count.
*/
void SetKillCount(const int32 NewKillCount) { KillCount = NewKillCount; }

Reset Kill Count​

/**
* Resets the internal counter tracking the number of AActors the component has killed to 0.
*/
void ResetKillCount() { KillCount = 0; }