35 — Enemy In Spotlight...
Fires while a sweeping beam on the tagged structure has a non-allied infantry unit or vehicle inside its detection radius.
- Numeric ID
35- Engine ID
TEVENT_ENEMY_IN_SPOTLIGHT- Editor name
- Enemy In Spotlight...
- Need token
NEED_NONE- Parameters
- None
- Attachment
- object
[Events]
<TriggerID>=1,35,0,0What the scan takes
Section titled “What the scan takes”Each frame, the beam searches for an intruder and springs the event on its structure’s tag when all of:
- the beam is sweeping;
- the beam’s structure is still in the game, is powered on, and has a tag;
- an infantry unit or vehicle stands in the cell under the beam or in one of the eight cells around it;
- that infantry unit or vehicle is not allied to the structure’s owner;
- it is closer to the beam than the beam’s detection radius plus 30 leptons.
The detection radius grows as the beam swings farther from its structure. The search always covers the same nine cells, so a radius that reaches past them detects nothing farther out.
Which beams reach the scan
Section titled “Which beams reach the scan”The beam’s behavior decides whether it searches:
| Behavior | Searches |
|---|---|
Sweep (1) | Every frame |
Circle (2) | Never |
None (0) | Never |
Follow (3) | Not while it has a target |
A beam set to circle or none never springs the event until Change Light Behavior switches it to another behavior.
A following beam that loses its target goes back to sweeping and searches every frame from then on. On the frame it loses the target, it searches from the point where it stopped following. From the next frame it moves along its sweep arc again.
- The search is centered on the beam's pool of light, which can be far from the structure.
- Only infantry and vehicles are detected. Aircraft and structures in the light are ignored.
- Any infantry unit or vehicle whose owner is not allied to the structure's owner is detected, including a neutral or civilian one.
- Put the tag on the structure that has the beam. A tag on the intruder, or on a cell the beam passes over, is never offered this event.
- Each find offers this event to the structure's tag and then offers the repeating spotlight event. On a persistent tag, the first offer marks this event as satisfied, so the trigger fires on both offers. After that it fires on every later offer the tag receives, as [remembering a satisfied event](/systems/trigger-springing/#remembering-a-satisfied-event) describes.
- Give this event a persistent tag. On a volatile or semi-persistent tag, a find that satisfies this event's trigger removes the tag from the structure, and the game crashes when the same find offers the repeating spotlight event. Use [Enemy In Spotlight... (repeating)](/mapping/events/tevent-enemy-in-spotlight-repeating/) on such tags.