KeepAnEyeOn (Procedure)

From the CreationKit Wiki
(Redirected from Procedure KeepAnEyeOn)
Jump to navigation Jump to search

Behavior

Description:
Tells an NPC to maintain line of sight to a target (typically the player). If the line of sight is ever broken, it creates a "Pursue" interrupt package which makes the NPC start following the target

The procedure completes:
Does not complete. (???)

Parameters

  • TargetToObserve (Target): The Target to keep an eye on. Typically the player, but if this is an object list the NPC will consider each ref in it. (It can only Pursue one at a time, however.)
  • ObservationArea (Location): The procedure only considers watching the target while the target is within this location. Likewise the pursuit interrupt will end if the target leaves this location.
  • EndPursuitArea (Location): (optional) The Pursue interrupt will end if the target ENTERS this area. Using this correctly requires finesse! First, this location needs to be entirely contained within the ObservationArea. Second, it needs to represent a space that will be entirely visible to the NPC after it returns to running whatever other procedure it was running simultaneously with KeepAnEyeOn. This isn't a strict requirement, but if the NPC ends its Pursuit and then returns to a location from which it cannot see the target, it will simply reactivate the Pursuit, creating an obnoxious looping behavior.

                                 

Notes

KeepAnEyeOn is a "mental" procedure. (Most procedures, such as Travel, Patrol, or Sandbox, are "Physical," meaning that they cause the actor to take action in the world. A few procedures are "Mental," meaning that they just process information; these cause no direct action in the world. An actor can run one physical procedure simultaneously with any number of mental procedures.)

Note that "line of sight" refers to 360-degree line of sight, which is blocked only if the raycasts are actually blocked by an obstacle. The NPC will not cteate the Pursue interrupt if the target is out of view only because the NPC is currently facing away it.

See Also

  • ??? None.