Advertisement
Guest User

Untitled

a guest
May 12th, 2019
98
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
SQF 3.44 KB | None | 0 0
  1. if (!isServer) exitWith {
  2.  
  3. private ["_trigger","_townmarker", "_thisTrigger"];
  4. _trigger = _this select 0;
  5. _townmarker = _this select 1;
  6. _thistrigger = _this select 2;
  7.  
  8. //sleep 5;
  9. scopeName "main";
  10. //_eastunits = east countSide allUnits;
  11. _eastunits = east countSide list _thistrigger;
  12. if (_eastunits < 2) then {    
  13.     _spawnedUnits = 0;
  14.     //while { _eastunits < 20 } do
  15.     for "_i" from 1 to 15 do
  16.     {
  17.             /* Feindgruppe */
  18.             _unitPool= ["CUP_O_TK_INS_Mechanic", "CUP_O_TK_INS_Mechanic", "CUP_O_TK_INS_Commander", "CUP_O_TK_INS_Soldier_TL", "CUP_O_TK_INS_Sniper", "CUP_O_TK_INS_Soldier_AT", "CUP_O_TK_INS_Soldier_AAT" , "CUP_O_TK_INS_Soldier_Enfield", "CUP_O_TK_INS_Soldier_FNFAL" , "CUP_O_TK_INS_Soldier", "CUP_O_TK_INS_Soldier_GL" , "CUP_O_TK_INS_Mechanic", "CUP_O_TK_INS_Bomber", "CUP_O_TK_INS_Soldier_MG", "CUP_O_TK_INS_Guerilla_Medic", "CUP_O_TK_INS_Guerilla_Medic", "CUP_O_TK_INS_Soldier_AA"];
  19.             _spawn = _unitPool call BIS_fnc_selectRandom;        
  20.             //_spawn = ["LOP_ISTS_Rifle_squad","LOP_ISTS_Support_section","LOP_ISTS_Patrol_section","LOP_ISTS_AT_section"] call BIS_fnc_selectRandom;                  
  21.             //_patroldis = [300,450,600] call bis_fnc_selectrandom;
  22.             //_position = [(getmarkerpos _townmarker), 100, 300, 10, 0, 20, 0] call BIS_fnc_findSafePos;  
  23.             //_position = [(getmarkerpos "marker5"), 100, 300, 10, 0, 20, 0] call BIS_fnc_findSafePos;  
  24.             //_position = [(getmarkerpos "marker5"), 200, 400, 10, 0, 20, 0] call BIS_fnc_findSafePos;
  25.             _marker = ["marker_2", "marker_3", "marker_4", "marker_5", "marker_6", "marker_7", "marker_8", "marker_9", "marker_10"] call BIS_fnc_selectRandom;
  26.             _position = [getmarkerpos _marker, 1, 15, 3, 0, 20, 0] call BIS_fnc_findSafePos;
  27.             //_wpSpeed = ["NORMAL","FULL","LIMITED"]  call BIS_fnc_selectRandom;
  28.             _wpSpeed = "FULL";
  29.             _mode =["AWARE","COMBAT"] call BIS_fnc_selectRandom;
  30.  
  31.                
  32.             //_groupname = [_position, east, (configfile >> "CfgGroups" >> "Indep" >> "LOP_ISTS" >> "Infantry" >> _spawn)] call BIS_fnc_spawnGroup;
  33.             //_groupname = [_position, east, ["CUP_O_TK_INS_Soldier_AT","CUP_O_TK_INS_Soldier_AAT","CUP_O_TK_INS_Soldier_AT","CUP_O_TK_INS_Soldier_AAT"], [[0,0,0],[1,0,0],[0,0,0],[1,0,0]],["Captain", "Private","Captain", "Private"]] call BIS_fnc_spawnGroup;
  34.             _groupname = [_position, east, [_spawn]] call BIS_fnc_spawnGroup;
  35.             {
  36.             _x setSkill ["general",0.25];
  37.             _x setSkill ["aimingAccuracy",0.2];
  38.             _x setSkill ["aimingShake",0.3];
  39.             _x setSkill ["aimingSpeed",0.8];
  40.             _x setSkill ["endurance",0.5];
  41.             _x setSkill ["spotDistance",0.7];
  42.             _x setSkill ["spotTime",0.7];
  43.             _x setSkill ["courage",1];
  44.             _x setSkill ["reloadspeed",0.5];
  45.             _x setSkill ["commanding",1];
  46.             } forEach units _groupname;
  47.             _groupname allowFleeing 0;
  48.             _groupname deleteGroupWhenEmpty true;
  49.  
  50.             _wp1 = _groupname addWaypoint [(getmarkerpos _townmarker), 0];
  51.             //_wp1 = _groupname addWaypoint [(getmarkerpos "marker5"), 0];
  52.             _wp1 setWaypointType "MOVE";
  53.             _wp1 setWaypointSpeed _wpSpeed;
  54.             _wp1 setWaypointBehaviour _mode;
  55.             //[_groupname,(getmarkerpos _townmarker), _patroldis] call BIS_fnc_taskPatrol;    
  56.             //[_groupname,(getmarkerpos "marker5"), _patroldis] call BIS_fnc_taskPatrol;
  57.  
  58.             //_eastunits = EAST countSide allUnits;
  59.         _eastunits = east countSide list _thistrigger;
  60.         _spawnedUnits = _spawnedUnits + 1;
  61.        
  62.         //if (_eastunits > 50) then {breakTo "main"}      
  63.         if (_eastunits > 10) then {breakTo "main"}
  64.  
  65.     };
  66.     hint format ["%1 enemies approaching", _spawnedUnits];
  67. };
  68.  
  69.  
  70.  
  71. };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement