Class LocationBasedActionSpec
Specifies an action that makes an NPC walk to a destination and perform a configured action while there.
public sealed class LocationBasedActionSpec : IScheduleActionSpec
- Inheritance
-
LocationBasedActionSpec
- Implements
- Inherited Members
- Extension Methods
Remarks
This action creates a ScheduleOne.NPCs.Schedules.NPCEvent_LocationBasedAction. When the NPC arrives, the selected ArriveBehaviour is started, then stopped when the schedule event ends.
Constructors
LocationBasedActionSpec()
public LocationBasedActionSpec()
Properties
ArriveBehaviour
Gets or sets the arrive behavior to start when the NPC reaches the destination.
public LocationArriveBehaviour ArriveBehaviour { get; set; }
Property Value
Destination
Gets or sets the world position where the NPC should walk to.
public Vector3 Destination { get; set; }
Property Value
- Vector3
DrinkEquippablePath
For Drinking: Resources path to the drink AvatarEquippable prefab (e.g. "Avatar/Equippables/Beer"). If null, uses the prefab's configured DrinkItem.
public string DrinkEquippablePath { get; set; }
Property Value
DurationMinutes
Gets or sets the duration in minutes for this action.
public int DurationMinutes { get; set; }
Property Value
EquippableAssetPath
For HoldItem: Resources path to the AvatarEquippable prefab (e.g. "Avatar/Equippables/Phone_Lowered"). If null, uses the prefab's configured HoldItem equippable.
public string EquippableAssetPath { get; set; }
Property Value
FaceDestinationDirection
Gets or sets whether the NPC should face the destination direction when walking.
public bool FaceDestinationDirection { get; set; }
Property Value
GraffitiRegion
For Graffiti: optional region to pick a spray surface from. If null, nearest to destination is used.
public Region? GraffitiRegion { get; set; }
Property Value
GraffitiSurfaceGuid
For Graffiti: optional GUID of a specific spray surface. Takes precedence over GraffitiRegion.
public Guid? GraffitiSurfaceGuid { get; set; }
Property Value
- Guid?
Name
Gets or sets the optional name for this action.
public string Name { get; set; }
Property Value
StartTime
Gets or sets the time when this action should start, in minutes from midnight.
public int StartTime { get; set; }
Property Value
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
Within
Gets or sets the distance threshold within which the NPC is considered to have arrived.
public float Within { get; set; }