A class in Root.Township, Alta.Intelligence.
Settings for ActiveFollow: chase the target with the pathfinder until close, giving up past a distance unless the target has hurt the creature enough. Server only.
Constructors
| Member | What it is |
|---|
AgentFollowSettings() | Unity makes components itself; use AddComponent or spawn a prefab instead of new. |
Fields
4 private and internal fields
| Member | What it is |
|---|
private float giveUpDistance | Backing field for GiveUpDistance (default -1, so any path length counts as too far). |
private float giveUpHurtMaximum | Backing field for GiveUpHurtMaximum (default 0). |
private float targetReachedDistance | Backing field for TargetReachedDistance (default 0.1). |
private float targetReachedRandomExtra | Backing field for TargetReachedRandomExtra. |
Properties
| Member | What it is |
|---|
float GiveUpDistance { get; } | The action cancels when the remaining path is longer than this and the target's hurt is at most GiveUpHurtMaximum. |
float GiveUpHurtMaximum { get; } | A target whose Hurt value is above this is never given up on for distance. |
float TargetReachedDistance { get; } | Distance from the target that counts as reached and finishes the action (unless overshooting). |
float TargetReachedRandomExtra { get; } | Up to this much random extra is added to TargetReachedDistance each time the action starts. |
Methods
| Member | What it is |
|---|
protected override IAction GetAction() | Builds the shared ActiveFollow action, which uses a target. |