Table of Contents

Class LocationDialogueSpec

Namespace
S1API.Entities.Schedule
Assembly
S1API.dll

Specifies an action that makes an NPC walk to a destination and start a location-based dialogue or interaction.

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

Remarks

This action creates a ScheduleOne.NPCs.Schedules.NPCEvent_LocationDialogue that will make the NPC walk to the specified destination and then trigger a dialogue or interaction at that location. This is useful for creating NPCs that wait at specific locations for player interaction.

Constructors

LocationDialogueSpec()

public LocationDialogueSpec()

Properties

ChoiceToEnable

Gets or sets the choice index to enable when the NPC reaches the destination.

public int ChoiceToEnable { get; set; }

Property Value

int

The choice index, or -1 to disable. Default is -1.

Remarks

This allows the NPC to present a specific dialogue choice when the player interacts with them at this location. Set to -1 to use the default choice behavior.

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.

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.

GreetingOverrideToEnable

Gets or sets the greeting override index to enable when the NPC reaches the destination.

public int GreetingOverrideToEnable { get; set; }

Property Value

int

The greeting override index, or -1 to disable. Default is -1.

Remarks

This allows the NPC to use a specific greeting override when the player interacts with them at this location. Set to -1 to use the default greeting behavior.

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 "LocationDialogue".

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.