TimelineAttackLogic ​
Inherits: AttackStateLogic < Resource
TimelineAttackLogic follows a scripted sequence of actions at specific times. Used for Scenario 2 - scripted MMO boss fights with predictable patterns.
Description ​
Example boss timeline:
- 0s: UseAbilityAction (Fireball)
- 10s: UseAbilityAction (Summon Adds)
- 20s: MoveToPointAction (Arena Center)
- 30s: Loop back to 0s
Between timeline events, the combat script's auto_basic_attack handles filler.
Properties ​
Array[CombatAction] | timeline_actions | [] |
Array[float] | action_times | [] |
bool | loop_timeline | true |
Variables ​
Array[TimelineEntry] | timeline | [] |
float | timeline_time | 0.0 |
int | next_event_index | 0 |
bool | timeline_completed | false |
Methods ​
void | setup( system_hub: GameHost.SystemHub, entity_ref: Entity, script: ModularCombatScript ) |
bool | execute( delta: float ) |
void | reset_timeline() |
Dictionary | to_save_data() |
void | from_save_data( save_data: Dictionary ) |
void | cleanup() |
Property descriptions ​
Array[CombatAction] timeline_actions = [] ​
The scripted timeline of actions with their trigger times
Array[float] action_times = [] ​
Times when each action should trigger (must match timeline_actions length)
bool loop_timeline = true ​
Whether the timeline loops
Variable descriptions ​
Array[TimelineEntry] timeline = [] ​
Internal timeline entries (built from actions + times)
float timeline_time = 0.0 ​
Current time in the timeline (seconds)
int next_event_index = 0 ​
Index of the next event to execute
bool timeline_completed = false ​
Whether the timeline has completed (if not looping)
Method descriptions ​
void setup( system_hub: GameHost.SystemHub, entity_ref: Entity, script: ModularCombatScript ) ​
Setup the timeline
bool execute( delta: float ) ​
Execute timeline logic
void reset_timeline() ​
Reset the timeline (useful for phase transitions)
Dictionary to_save_data() ​
Save runtime state
void from_save_data( save_data: Dictionary ) ​
Restore runtime state
void cleanup() ​
Cleanup