Follow (Procedure)

Behavior

Description:
Allows an actor to follow another actor or the player until the package is no longer valid.

  • Follower runs toward target until within max distance.
  • Follower tries to keep pace with target.
  • Actors following the player will sprint, under two circumstances:

The procedure completes:
Procedure does not end unless conditionalized out, or paired with a procedure that ends in a simultaneous branch.

Parameters

  • Target (Target): Specifies an actor to follow.
  • MinRadius (Float): Specifies the closest that the following actor should be to the target. If too close, the follower will not walk.
  • MaxRadius (Float): Specifies the furthest that the following actor should be from the target. If too far away, the follower will begin running.
  • GoToLeadersGoal (Bool): If following an NPC, will try to walk toward it, simulating an approximation of "walking with" rather than "following behind."
  • RideHorseIfPossible (Bool): If true, will ride a horse if possible.
  • NeedLOS (Bool): If true, actor will only follow if has Line of Sight to the target.

                           

Notes

  • If the follow target dies or is dead, the procedure is considered invalid and does not run.
  • The follower tries to move at the same speed as the target, but will begin to run after the target if they're too far away.
  • The follower sneaks if the target is sneaking.
  • Once pathing code can supply a pathing distance again, a follower should use this method rather than a raw distance check.

See Also

None