AreaRandomizeTargetEffect ​
Inherits: MinimumApplicationAreaEffect < AreaEffect < CollisionEffect < CompositeEffect < Effect < DatabaseResource < Resource
AreaRandomizeTargetEffect with pure raycast collision detection Supports entity targeting, position targeting, and temporal distribution
Properties ​
int | maximum_targets | 1 |
bool | allow_duplicate_targets | false |
bool | ignore_original_target | false |
TargetType | target_type | TargetType.ENTITIES |
bool | select_targets_over_time | false |
DistributionMode | distribution_mode | DistributionMode.EQUALLY_SPACED |
float | minimum_interval | 0.5 |
float | position_spread_radius | 1.0 |
bool | avoid_obstacles | true |
int | max_position_attempts | 10 |
bool | follow_terrain | true |
float | terrain_offset | 0.1 |
float | max_slope_angle | 45.0 |
float | raycast_height | 100.0 |
Methods ​
void | process_before_start( effect_instance: EffectInstance ) |
void | specific_effect_logic( effect_instance: EffectInstance ) |
void | on_apply_finished( effect_instance: EffectInstance ) |
String | get_effect_description() |
String | get_editor_description() |
Enumerations ​
enum TargetType ​
The options of target type: entities, positions, entity positions.
- ENTITIES =
0 - POSITIONS =
1 - ENTITY_POSITIONS =
2
enum DistributionMode ​
The options of distribution mode: equally spaced, random intervals.
- EQUALLY_SPACED =
0 - RANDOM_INTERVALS =
1
Property descriptions ​
Target Selection
int maximum_targets = 1 ​
Maximum number of targets to select
bool allow_duplicate_targets = false ​
Allow same target multiple times
bool ignore_original_target = false ​
Exclude the original effect target
TargetType target_type = TargetType.ENTITIES ​
What to target
Temporal Distribution
bool select_targets_over_time = false ​
Spread target selection over effect duration
DistributionMode distribution_mode = DistributionMode.EQUALLY_SPACED ​
How to distribute over time
float minimum_interval = 0.5 ​
Minimum time between selections (for random mode)
Position Settings
float position_spread_radius = 1.0 ​
Random spread around selected positions
bool avoid_obstacles = true ​
Try to avoid obstacle positions
int max_position_attempts = 10 ​
Max attempts to find valid position
Terrain Following
bool follow_terrain = true ​
Adjust Y position to ground level
float terrain_offset = 0.1 ​
Height offset above terrain
float max_slope_angle = 45.0 ​
Skip surfaces steeper than this (degrees)
float raycast_height = 100.0 ​
How high above to start raycasting
Method descriptions ​
void process_before_start( effect_instance: EffectInstance ) ​
Override to calculate required duration before EffectInstance creates timers
void specific_effect_logic( effect_instance: EffectInstance ) ​
What the effect does to its target when it is applied.
void on_apply_finished( effect_instance: EffectInstance ) ​
Called when the effect ends: takes back what it did.
String get_effect_description() ​
The text of the effect for tooltips, with its values filled in.
String get_editor_description() ​
A short text for the effect editor that says what the effect does.