[Guide] Easy tweaks for vehicle appearance

Party-approved future science plus handbooks for the revolution
Post Reply
User avatar
wolfenswan
Posts: 1209
Joined: Wed May 25, 2011 4:59 pm

[Guide] Easy tweaks for vehicle appearance

Post by wolfenswan »

You might have noticed that a good number of the vehicles in the game come in all kinds of fashion, despite all being the single class. There's no "Offroad Police (Red)" placeable in the editor, it's just the same civilian offroad with BI's semi-hidden appearance tweaks applied.

What we need
It is pretty easy to force any of these tweaks to make those vehicles appear as you'd like. All you need is these three commands:
  • setVariable - to access the color selection
  • animate - to modify the little doodads and gadgets in the vehicles appearance
  • animateDoor - to set the open/closed state of vehicle doors
Additionally, a look into the ARMA3 assets is required, specifically the objects sorted by side.

Let's try it with the aforementioned civilian offroad:
Open the "Civilians" category and look at the "Features" column on the right. You're looking for any of these three lines:
  • Randomization
  • Script animations
  • Script door sources
The object C_Offroad_01_F (the standard civilian offroad) offers the following:
Randomization: Yes, 6 skins
Script door sources: None
Script animations: HideDoor1, HideDoor2, HideDoor3, HidePolice, HideServices, HideBackpacks, HideBumper1, HideBumper2, HideConstruction
This means we can set any of 6 colors, animate no doors but can tweak all kinds of appearance.

Applying it in-editor
Now, what if we would want to place for example a blue police-offroad? Easy:
  • 1. Place the civilian offroad.
    2. In it's init-line, put:

    Code: Select all

    this setVariable ["color",3];
    nul = this spawn {sleep 0.1; _this animate["hidePolice",0];}
    
    3. Preview the mission and admire your shiny police offroad.
And that's it.

How exactly does it work?
For the color, we used setVariable with a number indicating to a possible color. The offroad has 6 colors available so we can put down any number between 0 and 5 (the possible colors are stored in an array, thus 0 references the first and 5 the last one).

For the animation we simple use the animation-name (as a "string") from the selection above and set either a 1 to activate it or a 0 to deactivate. In this case the animation actually hides the police lights so we set it to 0 to en-force them.

Animating doors works the exact same way. For example for the MH-900:

Code: Select all

this animateDoor ["DoorL_Front_Open",1,true];
The last value (true/false) decides whether the door should just pop open or play a proper animation transitioning from it's closed state (0) to the open one (1), or vice versa.



I hope that helps, I'll add some pictures when I get around to it.

Post Reply