Table of Contents

Class DriveToCarParkSpec

Namespace
S1API.Entities.Schedule
Assembly
S1API.dll

Specifies an action that makes an NPC drive to a car park and park a specified vehicle.

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

Remarks

This action creates a ScheduleOne.NPCs.Schedules.NPCSignal_DriveToCarPark that will make the NPC drive the specified vehicle to the designated parking lot and park it. The parking lot and vehicle can be specified using wrapper objects.

Constructors

DriveToCarParkSpec()

public DriveToCarParkSpec()

Properties

Alignment

Gets or sets the S1API-facing parking alignment to use when parking the vehicle.

public ParkingAlignment? Alignment { get; set; }

Property Value

ParkingAlignment?

The parking alignment, or null to use default or type-based alignment.

Remarks

This property takes precedence over ParkingType when both are specified. It provides a more type-safe way to specify parking behavior using the S1API ParkingAlignment enum.

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

OverrideParkingType

Gets or sets whether to override the default parking type behavior.

public bool? OverrideParkingType { get; set; }

Property Value

bool?

true to override parking type; otherwise, null for default behavior.

Remarks

When set to true, the action will use the parking type specified in ParkingType or Alignment instead of the default behavior.

ParkingLot

Gets or sets the parking lot wrapper object to avoid GUID lookups.

public ParkingLotWrapper ParkingLot { get; set; }

Property Value

ParkingLotWrapper

The parking lot wrapper, or null to use GUID-based lookup.

Remarks

This property takes precedence over ParkingLotGUID.

ParkingLotGUID

Gets or sets the GUID of the parking lot where the vehicle should be parked.

public string ParkingLotGUID { get; set; }

Property Value

string

The parking lot GUID, or null if using wrapper object.

Remarks

This property is used as a fallback if ParkingLot is not specified. The GUID should match the parking lot's unique identifier in the game.

ParkingLotName

Gets or sets the name of the parking lot GameObject for runtime resolution.

public string ParkingLotName { get; set; }

Property Value

string

The GameObject name, or null if not using name-based resolution.

Remarks

This property is used at runtime to find the parking lot by GameObject name. Takes precedence over GUID lookup but is overridden by wrapper object.

ParkingType

Gets or sets the parking type to use when parking the vehicle.

public int? ParkingType { get; set; }

Property Value

int?

The parking type as an integer, or null to use default or alignment-based type.

Remarks

This property is used when OverrideParkingType is true and Alignment is not specified. The value should correspond to the ScheduleOne.Vehicles.EParkingAlignment enum values.

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).

Vehicle

Gets or sets the vehicle wrapper object to avoid GUID lookups.

public LandVehicle Vehicle { get; set; }

Property Value

LandVehicle

The vehicle wrapper, or null to use GUID-based lookup.

Remarks

This property takes precedence over VehicleGUID and VehicleName.

VehicleCode

Gets or sets a vehicle code for runtime vehicle creation.

public string VehicleCode { get; set; }

Property Value

string

The vehicle code to create (e.g., "Sedan", "SUV"), or null if not creating.

Remarks

This property is used at runtime to create a new vehicle if one doesn't exist. Only used if Vehicle, VehicleGUID, and VehicleName are all null or failed resolution.

VehicleGUID

Gets or sets the GUID of the vehicle that should be driven to the parking lot.

public string VehicleGUID { get; set; }

Property Value

string

The vehicle GUID, or null if using wrapper object.

Remarks

This property is used as a fallback if Vehicle is not specified. The GUID should match the vehicle's unique identifier in the game.

VehicleName

Gets or sets the name of the vehicle GameObject for runtime resolution.

public string VehicleName { get; set; }

Property Value

string

The GameObject name, or null if not using name-based resolution.

Remarks

This property is used at runtime to find the vehicle by GameObject name. Takes precedence over GUID lookup but is overridden by wrapper object.

VehicleSpawnPosition

Gets or sets the spawn position for a created vehicle.

public Vector3 VehicleSpawnPosition { get; set; }

Property Value

Vector3

The world position where the vehicle should spawn.

Remarks

This property is used when creating a vehicle via VehicleCode. The vehicle will be spawned at this exact position when the schedule action executes.

VehicleSpawnRotation

Gets or sets the spawn rotation for a created vehicle.

public Quaternion? VehicleSpawnRotation { get; set; }

Property Value

Quaternion?

The world rotation for the vehicle spawn, or null to use identity rotation.

Remarks

This property is used when creating a vehicle via VehicleCode. If not specified, the vehicle will spawn with identity rotation (no rotation).