Skip to main content

AgentRegainControlSettings

A class in Root.Township, Alta.Intelligence.

Settings for ActiveRegainControl: wait until the creature's body has nearly stopped moving after being knocked about, then optionally switch action set. Server only.

Constructors​

MemberWhat it is
AgentRegainControlSettings()Unity makes components itself; use AddComponent or spawn a prefab instead of new.

Fields​

4 private and internal fields
MemberWhat it is
private ActionComponentSet exitToBacking field for ExitTo.
private bool hasMaxDurationBacking field for HasMaxDuration (default true).
private float minimumVelocityBacking field for MinimumVelocity (default 0.2).
private float walkerPowerPerSecondBacking field for WalkerPowerPerSecond (default 0.1).

Properties​

MemberWhat it is
ActionComponentSet ExitTo { get; }Action set the creature switches to when the action finishes. Null keeps the current set.
bool HasMaxDuration { get; }If true, the action also finishes after a random duration between the minimum and maximum.
float MinimumVelocity { get; }The action finishes once the rigidbody's speed drops below this.
float WalkerPowerPerSecond { get; }Rate the walker's power recovers while regaining control. Power is set to 1 when it finishes.

Methods​

MemberWhat it is
protected override IAction GetAction()Builds the shared ActiveRegainControl action, without a target.