Class NPCSteeringComponent
Added to NPCs that are moving.
Inheritance
System.Object
NPCSteeringComponent
Assembly: Content.Server.dll
Syntax
public sealed class NPCSteeringComponent : Component
Fields
|
Improve this Doc
View Source
ArriveOnLineOfSight
Are we considered arrived if we have line of sight of the target.
Declaration
public bool ArriveOnLineOfSight
Field Value
Type |
Description |
System.Boolean |
|
|
Improve this Doc
View Source
CanSeek
Used to override seeking behavior for context steering.
Declaration
Field Value
Type |
Description |
System.Boolean |
|
|
Improve this Doc
View Source
Coordinates
End target that we're trying to move to.
Declaration
public EntityCoordinates Coordinates
Field Value
Type |
Description |
Robust.Shared.Map.EntityCoordinates |
|
|
Improve this Doc
View Source
CurrentPath
Current path we're following to our coordinates.
Declaration
public Queue<PathPoly> CurrentPath
Field Value
|
Improve this Doc
View Source
Danger
Declaration
public readonly float[] Danger
Field Value
Type |
Description |
System.Single[] |
|
|
Improve this Doc
View Source
DangerPoints
Declaration
public readonly List<Vector2> DangerPoints
Field Value
Type |
Description |
List<Vector2> |
|
|
Improve this Doc
View Source
DoAfterId
If the NPC is using a do_after to clear an obstacle.
Declaration
public DoAfterId? DoAfterId
Field Value
Type |
Description |
System.Nullable<Content.Shared.DoAfter.DoAfterId> |
|
|
Improve this Doc
View Source
FailedPathCount
How many times we've failed to pathfind. Once this hits the limit we'll stop steering.
Declaration
public int FailedPathCount
Field Value
Type |
Description |
System.Int32 |
|
|
Improve this Doc
View Source
FailedPathLimit
Declaration
public const int FailedPathLimit = null
Field Value
Type |
Description |
System.Int32 |
|
|
Improve this Doc
View Source
Flags
Declaration
Field Value
|
Improve this Doc
View Source
ForceMove
Set to true from other systems if you wish to force the NPC to move closer.
Declaration
Field Value
Type |
Description |
System.Boolean |
|
|
Improve this Doc
View Source
Interest
Declaration
public readonly float[] Interest
Field Value
Type |
Description |
System.Single[] |
|
|
Improve this Doc
View Source
LastSteerDirection
Declaration
public Vector2 LastSteerDirection
Field Value
|
Improve this Doc
View Source
LastSteerIndex
Declaration
public int LastSteerIndex
Field Value
Type |
Description |
System.Int32 |
|
|
Improve this Doc
View Source
LastStuckCoordinates
Last position we considered for being stuck.
Declaration
public EntityCoordinates LastStuckCoordinates
Field Value
Type |
Description |
Robust.Shared.Map.EntityCoordinates |
|
|
Improve this Doc
View Source
LastStuckTime
Declaration
public TimeSpan LastStuckTime
Field Value
Type |
Description |
TimeSpan |
|
|
Improve this Doc
View Source
LineOfSightTimer
How long the target has been in line of sight if applicable.
Declaration
public float LineOfSightTimer
Field Value
Type |
Description |
System.Single |
|
|
Improve this Doc
View Source
LineOfSightTimeRequired
Declaration
public float LineOfSightTimeRequired
Field Value
Type |
Description |
System.Single |
|
|
Improve this Doc
View Source
NextSteer
Next time we can change our steering direction.
Declaration
public TimeSpan NextSteer
Field Value
Type |
Description |
TimeSpan |
|
|
Improve this Doc
View Source
PathfindToken
Declaration
public CancellationTokenSource? PathfindToken
Field Value
Type |
Description |
System.Nullable<CancellationTokenSource> |
|
|
Improve this Doc
View Source
Radius
Radius for collision avoidance.
Declaration
Field Value
Type |
Description |
System.Single |
|
|
Improve this Doc
View Source
Range
How close are we trying to get to the coordinates before being considered in range.
Declaration
Field Value
Type |
Description |
System.Single |
|
|
Improve this Doc
View Source
RepathRange
How far does the last node in the path need to be before considering re-pathfinding.
Declaration
Field Value
Type |
Description |
System.Single |
|
|
Improve this Doc
View Source
Status
Declaration
public SteeringStatus Status
Field Value
|
Improve this Doc
View Source
SteeringFrequency
Declaration
public const int SteeringFrequency = null
Field Value
Type |
Description |
System.Int32 |
|
|
Improve this Doc
View Source
StuckDistance
Declaration
public const float StuckDistance = null
Field Value
Type |
Description |
System.Single |
|
Properties
|
Improve this Doc
View Source
Pathfind
Have we currently requested a path.
Declaration
public bool Pathfind { get; }
Property Value
Type |
Description |
System.Boolean |
|