BIS_fnc_initVehicle

From Bohemia Interactive Community
Revision as of 02:20, 1 December 2018 by HazJ (talk | contribs)
Jump to navigation Jump to search
Hover & click on the images for description

Description

Description:
This function changes the textures, animation sources and/or mass of a given vehicle.
The use of BIS_fnc_initVehicle_customization variable in a vehicle's init field is possible (see Example 4)
Unless explicitly mentioned (see Example 3), the function will restore the initial state of every animation sources of the given object.

Additional information:

Execution:
call
Groups:
Uncategorised

Syntax

Syntax:
[vehicle, variant, animations, mass] call BIS_fnc_initVehicle
Parameters:
vehicle: Object - vehicle to customize
variant: (Optional, default false)
animations: (Optional, default false)
mass: (Optional, default false)
  • Boolean - true to set the default mass, false to disable the mass change
  • Number - mass to remove/add to the vehicle
Return Value:
Boolean - function success or not

Examples

Example 1:
result = [this, "", []] call BIS_fnc_initVehicle;
Example 2:
result = [this, ["MyTextureSource1", 0.5, "MyTextureSource2", 0.6], []] call BIS_fnc_initVehicle;
Example 3:
result = [this, nil, ["MyAnimationSource1", 0.5, "MyAnimationSource2", 0.7]] call BIS_fnc_initVehicle;
Example 4:
this setVariable ["BIS_fnc_initVehicle_customization", false, false, false]; // set in an init field

Additional Information

See also:
Vehicle Customization (VhC)CfgVehicleTemplatesdisableRandomization

Notes

Report bugs on the Feedback Tracker and/or discuss them on the Arma Discord or on the Forums.
Only post proven facts here! Add Note

Notes

Bottom Section