trigger_onsight

XashXT

trigger_onsight

A faithful recreation of the entity from Spirit of Half-Life. It is triggered when an NPC or scientist is “looking” at it. This is an evolution of Quake's SF_TRIGGER_CHECKANGLES spawnflag.

Spawnflags

SF_ONSIGHT_NOLOS 1 (skip checking for objects in the way of the looker's gaze at the trigger)
SF_ONSIGHT_NOGLASS 2 (ignore glass when checking for objects in the way of the looker's gaze at the trigger)

Options

max_health Field-of-view angle within which the trigger is considered visible. Use -1 for monsters.
frags Minimal distance between the objects at which visibility testing occurs. 0 turns off distance-based testing.
message Classname or targetname of the object that must be looked at instead of the trigger_onsight (this has little significance in XashXT, because a trigger_onsight can be easily parented).
netname Targetname of the object that looks at the trigger_onsight. To specify the player, leave blank or enter the *player keyword.
target Target that is activated when the looker's gaze meets the trigger_onsight.
noise Target that is activated when the looker's gaze leaves the trigger_onsight after meeting it.
noise1 Target that is activated to go into USE_ON when the gaze meets the trigger and then to go into USE_OFF when it leaves the trigger.

Usage Details

  • In the classic Spirit of Half-Life demo this object was used for creating a realistic retinal scanner, but more interesting uses can be invented for it. For example, you can unfreeze still monsters as soon as the player turns away from them only to see them in a mirror. Tricks of this sort are standard horror fare.