Escort (Procedure)
Jump to navigation
Jump to search
Behavior
Description:
- Escorting actor walks towards destination if following actor is within appropriate distance.
- If the escorted actors fall too far behind, the escorting actor will stop and turn to face one of them.
- If the escorting actors get too far ahead, the escorted actor will run to catch up to them.
If the player:
- Lead the player towards a destination
If another actor:
- Place a special Follow package on another NPC, overriding their normal packages. They then lead their follower to a specified location.
The procedure completes:
When the escorting actor reaches the destination
Parameters
- EscortedActor(s) (Target): Specifies an actor that get a special follow package (if PlayerRef, does not get follow package). Can take an object list with multiple actors.
- NumberToEscort (Int): Specifies how many actors (if using an ObjectList) should follow.
- Destination (Location): Specifies where to walk to.
- EscortWaitDist (Float): Specifies the closest that the following actor should be to the target. If too close, the follower will not walk.
- FollowMinDist (Float): Specifies the furthest that the following actor should be from the target. If too far away, the follower will begin running.
- FollowMaxDist (Float): Specifies the furthest that the following actor should be from the target. If too far away, the follower will begin running to "catch up."
- RideHorseIfPossible (Bool): Indicates that the actor should ride a horse if one is available. Default is false.
- PreferPreferredPath (Bool): Indicates that the actor should prefer navmesh triangles tagged as "preferred path". Default is true.
- RunIfBehindDist (Float): If any of the escorted actors are ahead (along the path to the goal) by more than this many units, the escorter will run to catch up to them. Default is 250.0.
Notes
There appears to be an issue with this procedure, when the player travels through a load door while the procedure is going. Upon return, the procedure breaks, and the 2 actors will be in different spots, or one of them is missing. Take care when using this procedure.
See Also
- ??? None.