Skip to content

EncounterAction ​

Inherits: Resource

Inherited by: CallReinforcementsAction, EncounterQuestActivateAction, ForceGroupTargetAction, GroupFormationAction, ModifyGroupBehaviorAction, SpawnEffectAction, TriggerEventAction

EncounterAction is the base class for actions that affect the entire encounter group. These handle group coordination, formation changes, and collective behaviors.

Properties ​

intpriority0
Array[EncounterCondition]conditions[]
floataction_cooldown0.0
boolcan_interruptfalse

Variables ​

EncounterGroupencounternull
floatcooldown_remaining0.0
GameHost.SystemHubsystem_hub

Methods ​

voidsetup( _encounter: EncounterGroup, p_system_hub: GameHost.SystemHub )
boolcan_execute()
boolexecute()
voidprocess( delta: float )
Array[Entity]get_alive_group_members()
Array[Entity]get_all_group_members()
Array[Entity]get_combat_group_members()
Vector3get_encounter_center()
voidcleanup()

Property descriptions ​

int priority = 0 ​

Priority of this action (higher = executed first if multiple actions trigger)

Array[EncounterCondition] conditions = [] ​

Conditions that must be met for this action to execute

float action_cooldown = 0.0 ​

Cooldown for this specific action (prevents spam)

bool can_interrupt = false ​

Whether this action can interrupt current group activities

Variable descriptions ​

EncounterGroup encounter = null ​

Reference to the special encounter instance

float cooldown_remaining = 0.0 ​

Internal cooldown timer

GameHost.SystemHub system_hub ​

Gameroot refrence for diverse actions

Method descriptions ​

void setup( _encounter: EncounterGroup, p_system_hub: GameHost.SystemHub ) ​

Setup this action with encounter reference

bool can_execute() ​

Check if this action can be executed

bool execute() ​

Execute this action

void process( delta: float ) ​

Update cooldown timer (called every frame by encounter)

Array[Entity] get_alive_group_members() ​

Get all alive group members

Array[Entity] get_all_group_members() ​

Get all group members (alive and dead)

Array[Entity] get_combat_group_members() ​

Get group members currently in combat

Vector3 get_encounter_center() ​

Get the encounter center position

void cleanup() ​

Cleanup any resources