StrafeAction ​
Inherits: CombatAction < Resource
StrafeAction circles around the target while maintaining facing direction. Useful for action RPG enemies that position tactically.
Properties ​
int | strafe_direction | 1 |
float | maintain_distance | 5.0 |
float | strafe_arc_degrees | 90.0 |
bool | should_walk | false |
float | strafe_duration | 0.0 |
Variables ​
float | strafe_start_time | 0.0 |
bool | is_strafing | false |
Methods ​
bool | is_strafe_complete( entity: Entity ) |
void | reset() |
Property descriptions ​
int strafe_direction = 1 ​
Strafe direction (1 = right/clockwise, -1 = left/counter-clockwise)
float maintain_distance = 5.0 ​
Distance to maintain from target
float strafe_arc_degrees = 90.0 ​
Arc angle to strafe (degrees) - how far to circle
bool should_walk = false ​
Whether to walk (true) or run (false)
float strafe_duration = 0.0 ​
Duration to strafe (seconds) - if 0, goes until arc complete
Variable descriptions ​
float strafe_start_time = 0.0 ​
Internal tracking
bool is_strafing = false ​
True while the entity circles its target.
Method descriptions ​
bool is_strafe_complete( entity: Entity ) ​
Check if strafe is complete (used by tactical logic)
void reset() ​
Reset for next use