Skip to content

Instantly share code, notes, and snippets.

@ronyx69
Created May 29, 2018 17:28
Show Gist options
  • Save ronyx69/ab2e3fdcbab5f78c9b41a337c1d19280 to your computer and use it in GitHub Desktop.
Save ronyx69/ab2e3fdcbab5f78c9b41a337c1d19280 to your computer and use it in GitHub Desktop.
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