Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*////////////////////////////////////
- Author: J.Shock
- Script File: redressInit.sqf
- Parameters:
- 1- Side (EAST, WEST, CIV, GUER) ~ default: EAST
- 2- Use of special units (true/false) ~ default: true
- 3- Check for spawned units (true/false) ~ default: false
- Description: Initializes all variables needed for redressing process.
- Also excludes the units that need not be redressed, as
- defined by the user in: _indvUnitExclude and _grpUnitExculde.
- Contains the gear/loadout arrays to be defined by user.
- Return: None
- **DISCLAIMER**
- Do not remove the header from this file. Any reproduced portions of this code
- must include credits to the author (J.Shock).
- *////////////////////////////////////
- _sideToRedress = [_this, 0, EAST, [EAST]] call BIS_fnc_param;
- _specialUnits = [_this, 1, true, [true]] call BIS_fnc_param;
- _continuous = [_this, 2, false, [true]] call BIS_fnc_param;
- //Need to exclude certain units/groups, fill out the below arrays!
- //-----------------------------
- _indvUnitExclude = [];//<<Put individual unit's variable names here.
- _grpUnitExculde = [];//<<Put the group leader's variable names here.
- _factionExclusion = [""];//<<Put faction classnames here
- //-----------------------------
- //Gear classes names go below!
- //-----------------------------
- JSHK_weaponArr = [""];
- JSHK_uniformArr = [""];
- JSHK_vestArr = [""];
- JSHK_headArr = ["H_Shemag_olive","H_ShemagOpen_tan","H_mas_afr_turban_O","H_ShemagOpen_khk"];
- JSHK_goggleArr = ["G_mas_wpn_shemag_r","G_Bandanna_aviator","G_Bandanna_khk","G_mas_wpn_wrap_f","G_mas_wpn_wrap_gog","G_mas_wpn_wrap_t"];
- JSHK_backpackArr = [""];
- //-----------------------------
- //Special Units Classnames
- //-----------------------------
- JSHK_ATunits = [""];
- JSHK_Medicalunits = [""];
- JSHK_AAunits = [""];
- //-----------------------------
- /////***************\\\\\
- // Leave the rest ALONE! \\
- /////***************\\\\\
- _units = [];
- {
- _currentUnit = _x;
- if ((side _currentUnit isEqualTo _sideToRedress) &&
- {({_currentUnit in (units group _x)}count _grpUnitExculde isEqualTo 0)} &&
- {!(_currentUnit in _indvUnitExclude)} &&
- {!(_currentUnit getVariable ["JSHK_doneRedress",false])}) then
- {
- _units set [count _units, _currentUnit];
- }
- else
- {
- if (({_currentUnit in (units group _x)}count _grpUnitExculde > 0) || (_currentUnit in _indvUnitExclude) || ((faction _currentUnit) in _factionExclusion)) then
- {
- _currentUnit setVariable ["JSHK_doneRedress",true];
- };
- };
- }forEach allUnits;
- [_units,_specialUnits,_sideToRedress,_continuous,_factionExclusion] call JSHK_fnc_Redress;
- diag_log "Shock's Redressing Script Initialized.";
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement