Table of Contents

Class WalkToSpec

Namespace
S1API.Entities.Schedule
Assembly
S1API.dll

Specifies a walk-to action that moves an NPC to a specific world position at a scheduled time.

public sealed class WalkToSpec : IScheduleActionSpec
Inheritance
WalkToSpec
Implements
Inherited Members
Extension Methods

Remarks

This action creates a ScheduleOne.NPCs.Schedules.NPCSignal_WalkToLocation that will make the NPC walk to the specified destination. The NPC will face the destination direction by default and will be considered to have arrived when within the specified threshold distance.

Constructors

WalkToSpec()

public WalkToSpec()

Properties

Destination

Gets or sets the world position where the NPC should walk to.

public Vector3 Destination { get; set; }

Property Value

Vector3

The destination coordinates in world space.

FaceDestinationDirection

Gets or sets whether the NPC should face the destination direction when walking.

public bool FaceDestinationDirection { get; set; }

Property Value

bool

true to make the NPC face the destination; otherwise, false. Default is true.

Forward

Gets or sets the optional forward direction for the destination marker.

public Vector3? Forward { get; set; }

Property Value

Vector3?

The forward direction vector, or null to auto-calculate from NPC position to destination.

Remarks

If specified, this vector will be used to orient the destination marker. If not specified, the direction will be calculated from the NPC's current position to the destination.

Name

Gets or sets the optional name for this action.

public string Name { get; set; }

Property Value

string

The action name, or null to use the default name "WalkTo".

StartTime

Gets or sets the time when this action should start, in minutes from midnight.

public int StartTime { get; set; }

Property Value

int

The start time in minutes (0-1439 for a 24-hour day).

WarpIfSkipped

Gets or sets whether the NPC should be warped to the destination if the action is skipped.

public bool WarpIfSkipped { get; set; }

Property Value

bool

true to warp if skipped; otherwise, false. Default is false.

Remarks

If the action is skipped (e.g., due to time jumps or schedule changes), setting this to true will teleport the NPC directly to the destination.

Within

Gets or sets the distance threshold within which the NPC is considered to have arrived.

public float Within { get; set; }

Property Value

float

The arrival threshold in world units. Default is 1.0f.

Remarks

The NPC will stop walking and consider the action complete when they are within this distance of the destination. Must be greater than 0.01f.