BIS fnc initVehicle: Difference between revisions
Jump to navigation
Jump to search
Lou Montana (talk | contribs) m (Text replacement - "\|( *\[\[[a-zA-Z]+\]\]) - ([a-z -]+) \|x1=" to "|r1=$1 - $2 |x1=") |
Lou Montana (talk | contribs) m (Text replacement - " \| *(\[[a-zA-Z,. ]*\] call ('''|\[\[)?BI(N|S)_fnc_[a-zA-Z]+('''|\]\])?) * \|p1=" to " |s1=$1 |p1=") |
||
Line 14: | Line 14: | ||
* Unless explicitly mentioned , the function will restore the initial state of every animation sources of the given object ('''Example 3'''). | * Unless explicitly mentioned , the function will restore the initial state of every animation sources of the given object ('''Example 3'''). | ||
| [vehicle, variant, animations, mass] call [[BIS_fnc_initVehicle]] | |s1=[vehicle, variant, animations, mass] call [[BIS_fnc_initVehicle]] | ||
|p1= vehicle: [[Object]] - vehicle to customize | |p1= vehicle: [[Object]] - vehicle to customize |
Revision as of 15:55, 12 June 2021
Description
- Description:
- Description needed
- Execution:
- call
- Groups:
- Vehicles
Syntax
- Syntax:
- [vehicle, variant, animations, mass] call BIS_fnc_initVehicle
- Parameters:
- vehicle: Object - vehicle to customize
- variant: (Optional, default false)
- Boolean - true to restore default texture source, false to skip texture source change
- Array - Array of texture sources with their probability, to format
["textureSource1", 0.5, "textureSource2", 0.5]
- String - Variant class name - from the configFile >> CfgVehicles or from the missionConfigFile >> CfgVehicleTemplates
- Number - index of the texture source (same as the old system)
- animations: (Optional, default false)
- Boolean - true to restore init phase of every animation sources
- Array - Array of animation sources with their probability, to format
["animationSource1", 0.5, "animationSource2", 0.5]
- String - variant class name - from the configFile >> CfgVehicles or from the missionConfigFile >> CfgVehicleTemplates
- mass: (Optional, default false)
- 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:
// Randomise camo net options with 50% probability [vehicle player, false, ["showcamonethull", 0.5, "showcamonetturret", 0.5, "showcamonetcannon", 0.5, "showslathull", 0.5]] call BIS_fnc_initVehicle;
- Example 6:
// Force show all camo net options. Use animationNames to get all available animation sources. Vehicles that don't support certain animations are simply ignored. [vehicle player, false, ["showcamonethull", 1, "showcamonetturret", 1, "showcamonetcannon", 1, "showslathull", 1]] call BIS_fnc_initVehicle;
Additional Information
- See also:
- See also needed
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