Advertisement
Guest User

Naked African Insurgents

a guest
May 13th, 2016
130
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.65 KB | None | 0 0
  1. /*////////////////////////////////////
  2.  
  3. Author: J.Shock
  4.  
  5. Script File: redressInit.sqf
  6.  
  7. Parameters:
  8. 1- Side (EAST, WEST, CIV, GUER) ~ default: EAST
  9. 2- Use of special units (true/false) ~ default: true
  10. 3- Check for spawned units (true/false) ~ default: false
  11.  
  12. Description: Initializes all variables needed for redressing process.
  13. Also excludes the units that need not be redressed, as
  14. defined by the user in: _indvUnitExclude and _grpUnitExculde.
  15. Contains the gear/loadout arrays to be defined by user.
  16.  
  17. Return: None
  18.  
  19. **DISCLAIMER**
  20. Do not remove the header from this file. Any reproduced portions of this code
  21. must include credits to the author (J.Shock).
  22.  
  23. *////////////////////////////////////
  24.  
  25.  
  26. _sideToRedress = [_this, 0, EAST, [EAST]] call BIS_fnc_param;
  27. _specialUnits = [_this, 1, true, [true]] call BIS_fnc_param;
  28. _continuous = [_this, 2, false, [true]] call BIS_fnc_param;
  29.  
  30.  
  31. //Need to exclude certain units/groups, fill out the below arrays!
  32. //-----------------------------
  33. _indvUnitExclude = [];//<<Put individual unit's variable names here.
  34. _grpUnitExculde = [];//<<Put the group leader's variable names here.
  35. _factionExclusion = [""];//<<Put faction classnames here
  36. //-----------------------------
  37.  
  38.  
  39. //Gear classes names go below!
  40. //-----------------------------
  41. JSHK_weaponArr = [""];
  42. JSHK_uniformArr = [""];
  43. JSHK_vestArr = [""];
  44. JSHK_headArr = ["H_Shemag_olive","H_ShemagOpen_tan","H_mas_afr_turban_O","H_ShemagOpen_khk"];
  45. 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"];
  46. JSHK_backpackArr = [""];
  47. //-----------------------------
  48.  
  49.  
  50. //Special Units Classnames
  51. //-----------------------------
  52. JSHK_ATunits = [""];
  53. JSHK_Medicalunits = [""];
  54. JSHK_AAunits = [""];
  55. //-----------------------------
  56.  
  57.  
  58.  
  59. /////***************\\\\\
  60.  
  61.  
  62. // Leave the rest ALONE! \\
  63.  
  64.  
  65. /////***************\\\\\
  66.  
  67. _units = [];
  68.  
  69. {
  70. _currentUnit = _x;
  71. if ((side _currentUnit isEqualTo _sideToRedress) &&
  72. {({_currentUnit in (units group _x)}count _grpUnitExculde isEqualTo 0)} &&
  73. {!(_currentUnit in _indvUnitExclude)} &&
  74. {!(_currentUnit getVariable ["JSHK_doneRedress",false])}) then
  75. {
  76. _units set [count _units, _currentUnit];
  77. }
  78. else
  79. {
  80. if (({_currentUnit in (units group _x)}count _grpUnitExculde > 0) || (_currentUnit in _indvUnitExclude) || ((faction _currentUnit) in _factionExclusion)) then
  81. {
  82. _currentUnit setVariable ["JSHK_doneRedress",true];
  83. };
  84. };
  85. }forEach allUnits;
  86.  
  87. [_units,_specialUnits,_sideToRedress,_continuous,_factionExclusion] call JSHK_fnc_Redress;
  88.  
  89. diag_log "Shock's Redressing Script Initialized.";
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement