Spotlight behavior
Modes a structure's spotlight beam runs in, from sweeping an arc to standing still and undrawn.
- Engine enum
LightBehaviorType- Input form
- Integer
HasSpotlight decides whether a structure has a beam at all, and SpotlightRadius covers which modes detect intruders.
A structure’s beam starts in Sweep when the structure is placed. A map’s structure entry can give it another mode, and the Change Light Behavior trigger action can change the mode during play.
Follow lasts only while the beam has a target within reach. The beam returns to Sweep when the target is SpotlightMovementRadius or farther from the structure. It also returns to Sweep, and forgets the target, when the target is destroyed, cloaks, changes owner or is removed from the map, such as by boarding a transport.
When Follow is set with no non-allied infantry or vehicle near the beam, the beam returns to Sweep on the next frame. The exception is a beam that has followed a target before and has not forgotten it. That beam follows the same target again while the target is closer to the structure than SpotlightMovementRadius.
Values
4 of 4
| Input | Meaning | Engine constant | Stored value |
|---|---|---|---|
0 | The beam is held in place and not drawn at all. | LIGHT_BEHAVIOR_NONE | 0 |
1 | The beam sweeps back and forth across an arc centered on the structure's facing. | LIGHT_BEHAVIOR_SWEEP | 1 |
2 | The beam travels around the structure at a constant rate. | LIGHT_BEHAVIOR_CIRCLE | 2 |
3 | The beam follows the nearest non-allied infantry or vehicle in or next to the beam's cell at the moment the mode is set. | LIGHT_BEHAVIOR_FOLLOW | 3 |
No enum values match this filter.
Used by
- Change Light Behavior
TACTION_CHANGE_SPOTLIGHT_BEHAVIOR
Source files
Linked at revision 51b52aa38392.