Advertisement
Guest User

ZAUS.sqf

a guest
May 3rd, 2019
122
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
SQF 2.50 KB | None | 0 0
  1. if (!isServer) exitWith {};
  2.  
  3. west setFriend [east, 0];
  4. east setFriend [west, 0];
  5.  
  6. west setFriend [independent, 0];
  7. independent setFriend [west, 0];
  8.  
  9. east setFriend [independent, 1];
  10. independent setFriend [east, 1];
  11.  
  12. _enemyClass = ["LOP_ISTS_OPF_Infantry_TL", "LOP_ISTS_OPF_Infantry_AR", "LOP_ISTS_OPF_Infantry_GL", "LOP_ISTS_OPF_Infantry_Rifleman_5"];
  13.  
  14. _enemyGroups = [
  15.     (configfile >> "CfgGroups" >> "East" >> "LOP_ISTS_OPF" >> "Infantry" >> "PO_ISTS_OPF_inf_WEAP_SQ"),
  16.     (configfile >> "CfgGroups" >> "East" >> "LOP_ISTS_OPF" >> "Armored" >> "PO_ISTS_OPF_Combined_Platoon"),
  17.     (configfile >> "CfgGroups" >> "East" >> "LOP_ISTS_OPF" >> "Motorized" >> "PO_ISTS_OPF_MotInf_Team")
  18. ];
  19.  
  20. _zargabad = [4139.904, 4092.213, 0];
  21. _distance = 400;
  22.  
  23. _enemyStaticCount = 100;
  24. _groupCount = 6;
  25. _waypointCount = 4;
  26.  
  27. _vipClass = "LOP_CHR_Civ_Functionary_01";
  28. _vipPos = [4249.14,4078.31,3.681];
  29. _vipName = ["Hugo Chávez","Hugo","Chávez"];
  30.  
  31. _houses = _zargabad nearObjects ["House", _distance];
  32. _roads = _zargabad nearRoads _distance;    
  33.  
  34.  
  35. _vipGroup = createGroup civilian;
  36. _vip = _vipGroup createUnit [_vipClass, _vipPos, [], 0, "NONE"];
  37. _vip disableAi "PATH";
  38. _vip setName _vipName;
  39.  
  40. _staticGroup = createGroup EAST;
  41.  
  42. for "_i" from 0 to _enemyStaticCount do {
  43.     _house = getPos (selectRandom _houses);
  44.     _class = selectRandom _enemyClass;
  45.     _u = _staticGroup createUnit [_class, _house, [], 0, "NONE"];
  46.     _u disableAi "PATH";
  47.    
  48.     if ((random 1) < 0.2) then {
  49.         _null = [_u] spawn {
  50.             params ["_u"];
  51.             while {alive _u} do {
  52.                 sleep random [1, 20, 50];
  53.                 _u forceWeaponFire [(currentWeapon _u), (currentWeaponMode _u)];
  54.             };
  55.         };
  56.     };
  57. };
  58.  
  59. for "_i" from 0 to _groupCount do {
  60.     _road = getPos (selectRandom _roads);
  61.     _class = selectRandom _enemyGroups;
  62.     _group = [_road, EAST, _class] call BIS_fnc_spawnGroup;
  63.  
  64.     for "_j" from 0 to _waypointCount do {
  65.         _road = getPos (selectRandom _roads);
  66.         _wp =_group addWaypoint [_road, _j];
  67.     };
  68. };
  69.  
  70. ###########################################
  71.  
  72. _null = [] spawn {
  73.     [player, -1, 0.8, true] call BIS_fnc_sandstorm;
  74.     if (hasInterface) then {
  75.         _hndlCc = ppEffectCreate ["ColorCorrections", 1550];
  76.         _hndlCc ppEffectEnable true;
  77.         _hndlCc ppEffectAdjust [1, 1, 0, [0, 0, 0, 0], [0.8, 0.4, 0.05, 0.3], [0.33, 0.33, 0.33, 0]];
  78.         _hndlCc ppEffectCommit 20;
  79.         waitUntil {ppEffectCommitted _hndlCc};
  80.     };
  81. };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement