Patrol Package
The Patrol Package allows an actor to move along a path of linked references, optionally performing an action at each point for a specified amount of time. Patrols can be set up to be repeatable or non-repeatable (see below for definitions).
Package Specific DataEdit
- Starting Location:
- Linked Ref: Use its own linked reference as the starting location of the patrol. If there is no linked ref, the package is invalid and will be ignored by an actor (move on to the next in the AI stack).
- Near Reference: The actor will move to this location, and then move to the next linked reference until the end of the patrol path is reached.
- Radius: Indicates how close the NPC has to get to ANY point on the patrol.
- Flags:
- Repeatable: Check to make this patrol repeatable.
- Patrol Point List: Double-click on any point to view it in the render window.
BehaviorEdit
Repeatable PatrolsEdit
Patrols are marked as either repeatable, or not repeatable. The two types of patrols work as follows:
- Repeatable Patrol:
- Actor moves along patrol route continuously until another package evaluates -- either in a circular loop (if the patrol route is a circle) or back and forth along a linear route.
- Thus, a repeatable patrol has no notion of "Must Complete" (like a wander).
- When an actor starts a repeatable patrol package, it moves to the closest point on the patrol route, not the first point.
- Non-repeatable Patrol:
- Actor always starts at first point in patrol route, and does the patrol route once. (If the route is circular, the actor ends its patrol on the starting point.)
- If the package has a duration, the actor stays at the endpoint of the patrol until the duration expires.
- If the package has no duration, the package is "done" when the actor reaches the endpoint of the patrol. If the package remains valid, the actor starts the patrol over again by travelling directly to the start point of the patrol.
Data on patrol pointsEdit
Most of the patrol behavior is specified on the patrol points themselves, not in the package. See Idle Markers for more information about what can be specified on a marker.
NotesEdit
- If you use Heading Markers or Idle Markers in a patrol, the NPC will rotate to face the orientation of the marker. So:
- If you don’t care about orientation, use an X Marker, else:
- If you care about orientation, use a heading marker.
- You can specify the time to spend at a reference through the Patrol tab in the reference properties. Default is 0, meaning they move on to the next marker right away. If you set it to anything else, they will wait at the marker, and if it’s an idle marker, they will play the animations set in the marker.
- Reference editor Patrol tab allows specifying a script; this will be run by the NPC arriving at that patrol point.
Simple PatrolEdit
An Actor can be put on a simple patrol using the new Linked Ref tab found when editing references.
To set up a simple three-point patrol:
- Place three XMarkers on the ground and give each one a reference name (patrol01REF, patrol02REF, patrol03REF for example). You'll probably want to prefix your REF names with the Actor's name or Cell name for clarity.
- Move the XMarkers to a place on the map you want your Actor to patrol.
- To link the XMarkers, simply double-click each one and click the Linked Ref tab and choose the appropriate reference.
- A yellow line should appear, marking the patrol path.
- For example, using the reference names above, patrol01REF should be linked to patrol02REF, patrol02REF to patrol03REF, and patrol03REF to patrol01REF completing a loop.
- Now create or choose an existing patrol package for your actor and drop it in its package list.
- Open the reference window for the actor and choose one of the patrol REFs under the Linked Ref tab.
- When the map is loaded and the Actor begins that package, he will snap to the patrol REF listed in the Linked Ref tab.
FlagsEdit
- Pretend In Combat: The actor will perform the travel behavior on the way to each patrol point and continue on to the next point.
- Continue During Combat: The actor will perform the travel behavior on the way to each patrol point and continue on to the next point.