Show / Hide Table of Contents

Class MoveToOperator

Moves an NPC to the specified target key. Hands the actual steering off to NPCSystem.Steering

Inheritance
System.Object
HTNOperator
MoveToOperator
Implements
IHtnConditionalShutdown
Namespace: Content.Server.NPC.HTN.PrimitiveTasks.Operators
Assembly: Content.Server.dll
Syntax
public sealed class MoveToOperator : HTNOperator, IHtnConditionalShutdown

Fields

| Improve this Doc View Source

PathfindInPlanning

Should we assume the MovementTarget is reachable during planning or should we pathfind to it?

Declaration
public bool PathfindInPlanning
Field Value
Type Description
System.Boolean
| Improve this Doc View Source

PathfindKey

Where the pathfinding result will be stored (if applicable). This gets removed after execution.

Declaration
public string PathfindKey
Field Value
Type Description
System.String
| Improve this Doc View Source

RangeKey

How close we need to get before considering movement finished.

Declaration
public string RangeKey
Field Value
Type Description
System.String
| Improve this Doc View Source

RemoveKeyOnFinish

When we're finished moving to the target should we remove its key?

Declaration
public bool RemoveKeyOnFinish
Field Value
Type Description
System.Boolean
| Improve this Doc View Source

StopOnLineOfSight

Do we only need to move into line of sight.

Declaration
public bool StopOnLineOfSight
Field Value
Type Description
System.Boolean
| Improve this Doc View Source

TargetKey

Target Coordinates to move to. This gets removed after execution.

Declaration
public string TargetKey
Field Value
Type Description
System.String

Properties

| Improve this Doc View Source

ShutdownState

When to shut the task down.

Declaration
public HTNPlanState ShutdownState { get; }
Property Value
Type Description
HTNPlanState

Methods

| Improve this Doc View Source

ConditionalShutdown(NPCBlackboard)

Declaration
public void ConditionalShutdown(NPCBlackboard blackboard)
Parameters
Type Name Description
NPCBlackboard blackboard
| Improve this Doc View Source

Initialize(IEntitySystemManager)

Declaration
public override void Initialize(IEntitySystemManager sysManager)
Parameters
Type Name Description
IEntitySystemManager sysManager
Overrides
HTNOperator.Initialize(IEntitySystemManager)
| Improve this Doc View Source

Plan(NPCBlackboard, CancellationToken)

Declaration
public override Task<(bool Valid, Dictionary<string, object>? Effects)> Plan(NPCBlackboard blackboard, CancellationToken cancelToken)
Parameters
Type Name Description
NPCBlackboard blackboard
CancellationToken cancelToken
Returns
Type Description
Task<System.ValueTuple<System.Boolean, System.Nullable<Dictionary<System.String, System.Object>>>>
Overrides
HTNOperator.Plan(NPCBlackboard, CancellationToken)
| Improve this Doc View Source

Startup(NPCBlackboard)

Declaration
public override void Startup(NPCBlackboard blackboard)
Parameters
Type Name Description
NPCBlackboard blackboard
Overrides
HTNOperator.Startup(NPCBlackboard)
| Improve this Doc View Source

Update(NPCBlackboard, Single)

Declaration
public override HTNOperatorStatus Update(NPCBlackboard blackboard, float frameTime)
Parameters
Type Name Description
NPCBlackboard blackboard
System.Single frameTime
Returns
Type Description
HTNOperatorStatus
Overrides
HTNOperator.Update(NPCBlackboard, Single)

Implements

IHtnConditionalShutdown
  • Improve this Doc
  • View Source
☀
☾
In This Article
Back to top
Generated by DocFX
☀
☾