CombatAction ​
Inherits: Resource
Inherited by: ActivateQuestCombatAction, CallForHelpAction, ClearTargetAction, ComboAction, DelayAction, FaceTargetAction, KeepDistanceAction, MoveToAllyPositionAction, MoveToPointAction, PlayStingerCombatAction, RetreatAction, SayCombatAction, SetMusicIntensityCombatAction, SetMusicStateCombatAction, SpawnInteractableCombatAction, SpawnNPCCombatAction, SpawnWorldEffectCombatAction, StrafeAction, SwitchToAllyAction, SwitchToEnemyAction, SwitchToHighestThreatAction, TriggerEventCombatAction, UseAbilityAction, UseAbilityAtPointAction, WaitForConditionAction
CombatAction is the base class for all combat actions. Actions represent things an entity can do during combat.
Properties ​
int | priority | 0 |
Array[EntityCondition] | conditions | [] |
float | action_cooldown | 0.0 |
bool | interrupt_casting | false |
Variables ​
Timer | cooldown_timer | |
GameHost.SystemHub | system_hub |
Methods ​
void | set_system_refs( p_system_hub: GameHost.SystemHub ) |
bool | can_execute( entity: Entity ) |
void | process( _delta: float ) |
bool | execute( entity: Entity ) |
void | cleanup() |
Property descriptions ​
int priority = 0 ​
Priority of this action (higher = checked first in priority lists)
Array[EntityCondition] conditions = [] ​
Conditions that must be met for this action to execute
float action_cooldown = 0.0 ​
Cooldown for this specific action (independent of ability cooldown)
bool interrupt_casting = false ​
Whether this action should interrupt current casting
Variable descriptions ​
Timer cooldown_timer ​
Internal cooldown timer
GameHost.SystemHub system_hub ​
SystemRefs
Method descriptions ​
void set_system_refs( p_system_hub: GameHost.SystemHub ) ​
Gives the action and its conditions the hub of the game systems.
bool can_execute( entity: Entity ) ​
Check if this action can be executed
void process( _delta: float ) ​
Called every combat tick by the logic that owns the action (cooldowns count on timers: nothing to do here, subclasses may)
bool execute( entity: Entity ) ​
Execute this action
void cleanup() ​
Cleanup any resources