Instantly share code, notes, and snippets.

Embed
What would you like to do?
Change the flags of a vehicle sub mesh in asset editor.
var subMesh = 0; // sub mesh id, order as in ui, starting from 1 (0 is main mesh)
var asset = ToolsModifierControl.toolController.m_editPrefabInfo as VehicleInfo;
// required and forbidden flags, use | to set multiple flags
asset.m_subMeshes[subMesh].m_vehicleFlagsRequired = Vehicle.Flags.Created | Vehicle.Flags.Flying;
asset.m_subMeshes[subMesh].m_vehicleFlagsForbidden = Vehicle.Flags.Reversed;
// parked flags
asset.m_subMeshes[subMesh].m_parkedFlagsRequired = VehicleParked.Flags.CustomName;
asset.m_subMeshes[subMesh].m_parkedFlagsForbidden = VehicleParked.Flags.None;
// all vehicle flags:
/*
Created
Deleted
Spawned
Inverted
TransferToTarget
TransferToSource
Emergency1
Emergency2
WaitingPath
Stopped
Leaving
Arriving
Reversed
TakingOff
Flying
Landing
WaitingSpace
WaitingCargo
GoingBack
WaitingTarget
Importing
Exporting
Parking
CustomName
OnGravel
WaitingLoading
Congestion
DummyTraffic
Underground
Transition
InsideBuilding
LeftHandDrive
*/
// all vehicle parked flags:
/*
None
Created
Deleted
Updated
Parking
CustomName
All
*/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment