Created
May 29, 2018 17:28
-
-
Save ronyx69/ab2e3fdcbab5f78c9b41a337c1d19280 to your computer and use it in GitHub Desktop.
Change the flags of a vehicle sub mesh in asset editor.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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