Difference between revisions of "cmf kosherArsenal fnc init"

From cluster wiki
Jump to navigation Jump to search
(added comment in example 2, fixed typo, added default value entries for light, forcePrimary and randomPos.)
 
(One intermediate revision by the same user not shown)
Line 18: Line 18:
|s1=[loadouts, light, forePrimary, randomPos] call [[cmf_kosherArsenal_fnc_init]]
|s1=[loadouts, light, forePrimary, randomPos] call [[cmf_kosherArsenal_fnc_init]]


|p1= loadouts: [https://community.bistudio.com/wiki/Array Array] - An array containing the filenames for loadouts to load (ommit .sqf from the filename).
|p1= loadouts: [https://community.bistudio.com/wiki/Array Array] - An array containing the filenames for loadouts to load (ommit .sqf from the filename).  


|p2= light: [https://community.bistudio.com/wiki/Boolean Boolean] - When true will attach a light that is only visible for the unit in the arsenal.
|p2= light: [https://community.bistudio.com/wiki/Boolean Boolean] - (Optional, default false) When true will attach a light that is only visible for the unit in the arsenal.


|p3= forcePrimary: [https://community.bistudio.com/wiki/Boolean Boolean] - When true will force the unit to select a primary weapon before exiting the arsenal.
|p3= forcePrimary: [https://community.bistudio.com/wiki/Boolean Boolean] - (Optional, default true) When true will force the unit to select a primary weapon before exiting the arsenal.


|p4= randomPos: [https://community.bistudio.com/wiki/Boolean Boolean] - When true will randomize the unit's position (to prevent cluttering when multiple units spawn in, is now deprecated as Arma 3 does this automatically).
|p4= randomPos: [https://community.bistudio.com/wiki/Boolean Boolean] - (Optional, default false) When true will randomize the unit's position (to prevent cluttering when multiple units spawn in, is now deprecated as Arma 3 does this automatically).


|r1=None
|r1=None


|x1= {{code|lang=scilab|<nowiki>[["exampleLoadout"], true, false, true] call cmf_kosherArsenal_fnc_init;</nowiki>}}
|x1= {{code|lang=scilab|<nowiki>[["exampleLoadout"], true, false, true] call cmf_kosherArsenal_fnc_init;</nowiki>}}
|x2= {{code|lang=scilab|<nowiki> // Defines loadout files for team 0 and 1. 
[["exampleLoadout0", "exampleLoadout1"], false] call cmf_kosherArsenal_fnc_init;</nowiki>}}


|seealso= [[cmf_kosherArsenal_fnc_ammobox]] [[cmf_kosherArsenal_fnc_forceArsenal]] [[cmf_kosherArsenal_fnc_forceClose]]  
|seealso= [[cmf_kosherArsenal_fnc_ammobox]] [[cmf_kosherArsenal_fnc_forceArsenal]] [[cmf_kosherArsenal_fnc_forceClose]] [[cmf_kosherArsenal_fnc_kosherAI]] [[cmf_common_fnc_setRole]]  
[[cmf_kosherArsenal_fnc_kosherAI]]


|var1= {{!}} GLOBAL {{!}}{{!}} Unit {{!}}{{!}} cmf_kosherArsenal_loadout {{!}}{{!}} A variable containing the loadoutfile to use
|var1= {{!}} GLOBAL {{!}}{{!}} Unit {{!}}{{!}} cmf_kosherArsenal_loadout {{!}}{{!}} A variable containing the loadoutfile to use

Latest revision as of 19:18, 28 November 2023


Hover & click on the images for description
Description
Description:
This function will initialize kosherArsenal for the local player.
Execution:
Call
Groups:
CMF3: kosherArsenal
Syntax
Syntax:
[loadouts, light, forePrimary, randomPos] call cmf_kosherArsenal_fnc_init
Parameters:
loadouts: Array - An array containing the filenames for loadouts to load (ommit .sqf from the filename).
light: Boolean - (Optional, default false) When true will attach a light that is only visible for the unit in the arsenal.
forcePrimary: Boolean - (Optional, default true) When true will force the unit to select a primary weapon before exiting the arsenal.
randomPos: Boolean - (Optional, default false) When true will randomize the unit's position (to prevent cluttering when multiple units spawn in, is now deprecated as Arma 3 does this automatically).
Return Value:
None
Examples
Example 1:
[["exampleLoadout"], true, false, true] call cmf_kosherArsenal_fnc_init;
Example 2:
 // Defines loadout files for team 0 and 1.  
[["exampleLoadout0", "exampleLoadout1"], false] call cmf_kosherArsenal_fnc_init;
Additional Information
See also:
cmf_kosherArsenal_fnc_ammobox cmf_kosherArsenal_fnc_forceArsenal cmf_kosherArsenal_fnc_forceClose cmf_kosherArsenal_fnc_kosherAI cmf_common_fnc_setRole
Internal Variables
Locality Namespace Name Description
GLOBAL Unit cmf_kosherArsenal_loadout A variable containing the loadoutfile to use
Events
Locality Name Variables Description
LOCAL cmf_kosherArsenal_onOpen [wasForced] Is raised locally when the kosherArsenal arsenal is opened
LOCAL cmf_kosherArsenal_onAmmoboxClose [wasForced] Is raised locally when the kosherArsenal arsenal is closed
Notes