DisorientedState ​
Inherits: ActionState < Resource
DisorientedState represents when an entity is disoriented. The entity wanders randomly within a radius of their original position.
Description ​
Key features:
- Random wandering within configurable radius
- Periodic direction changes
- Tracks originating entity
- Automatically exits when disorient effect expires (handled by EffectsComponent)
Variables ​
float | wander_radius | 5.0 |
Timer | direction_change_timer | |
Vector3 | original_position | |
Vector3 | random_target_position | |
Entity | disorienting_entity |
Methods ​
void | enter() |
void | update( _delta: float ) |
void | exit() |
void | set_state_data( data: Dictionary ) |
void | return_all_timer() |
Variable descriptions ​
float wander_radius = 5.0 ​
Wander radius
Timer direction_change_timer ​
Timer for changing direction
Vector3 original_position ​
Original position when entering state
Vector3 random_target_position ​
Current random target position
Entity disorienting_entity ​
Entity that caused the disorientation
Method descriptions ​
void enter() ​
Called when entering the disoriented state
void update( _delta: float ) ​
Called every frame to check state and update wandering
void exit() ​
Called when exiting the disoriented state
void set_state_data( data: Dictionary ) ​
Set state data from external source
void return_all_timer() ​
Timer cleanup