Jump to content
bangabob

Enemy occupation system (eos)

Recommended Posts

On 22/4/2018 at 1:00 PM, quickdagger said:

I mean, once I occupy key sectors like an airfield_marker_1, then it pops up friendly units. No big deal, just same sintax, same parameters, etc. It would be something like this:

 

if marker = red, then null = [["MARKERNAME"],[2,1,70],[0,1],[1,2,30],[2,60],[2],[1,0,10],[1,0,250,EAST]] call EOS_Spawn;

if marker = blue, then null = [["MARKERNAME"],[2,1,70],[0,1],[1,2,30],[2,60],[2],[1,0,10],[2,1,250,WEST]] call EOS_Spawn;

 

Hey man, I'm using this snippet to spawn areas after you clear some others...

_spawnarea = [] spawn {


	_areas = ["NARCOS","NARCOS_1","NARCOS_2"];
	waitUntil {sleep 1; { getMarkerColor _x == "ColorGreen"; } count _areas == count _areas};
	null = [["NARCOS_3"],[2,2,80],[2,1,80],[1,1,75],[0,0],[0],[0,0],[7,0,500,EAST,FALSE,FALSE]] call EOS_Spawn;
	null = [["NARCOS_4"],[2,2,80],[2,1,80],[1,1,75],[0,0],[0],[0,0],[7,0,500,EAST,FALSE,FALSE]] call EOS_Spawn;
	null = [["NARCOS_5"],[2,2,80],[2,1,80],[1,1,75],[0,0],[0],[0,0],[7,0,500,EAST,FALSE,FALSE]] call EOS_Spawn;
	hint "You disclosed new hideouts locations";
};

Test this....(I'm at work now)

 

null = [["Airfield_marker_1"],[2,1,70],[0,1],[1,2,30],[2,60],[2],[1,0,10],[1,0,250,EAST]] call EOS_Spawn;
	waitUntil { getMarkerColor "Airfield_marker_1" == "ColorGreen"};
null = [["Airfield_marker_1"],[2,1,70],[0,1],[1,2,30],[2,60],[2],[1,0,10],[2,1,250,WEST]] call EOS_Spawn;
sleep 3;
hint "You have access to a friendly area now";

 

  • Like 3

Share this post


Link to post
Share on other sites

Is there a way to save the green zones that have been cleared out so when I restart my sever it do not have to clear them out again ?    was thinking about using Inidbi  has anyone done that yet ?

 

Thanks

Share this post


Link to post
Share on other sites

Now I am trying to make EOS house groups spawn inside EM Buildings but, they don't. Is there a way?

 

I have placed a hospital building and a marker called "cqb_1" over it but, units are not spawning.

Share this post


Link to post
Share on other sites
10 hours ago, quickdagger said:

Now I am trying to make EOS house groups spawn inside EM Buildings but, they don't. Is there a way?

 

I have placed a hospital building and a marker called "cqb_1" over it but, units are not spawning.

I suspect those buildings aren't set up with AI positions and pathing.....

  • Like 1

Share this post


Link to post
Share on other sites

I didn't even know it exists. AI positions and pathing?

 

In this case, would you mind, please, sharing some buildings mod you know of, which come with this pathing thing?

 

I ask that because default buildings are not good for CQB missions, they are rather too small incomplete, with only parts of the buildings being enterable. It is a bit of a shame because there are so many  cool exteriors like factories and such.

 

I want to make a simple dynamic environment: you fool around engaging patrols and, when you meet big buildings you enter CQB. After you clear it, a few friendlies pop up.

 

 

Share this post


Link to post
Share on other sites
17 hours ago, quickdagger said:

Hi zagor64bz

 

It works!!!!!

 

Perfect! Thank you!

Glad to help!!

  • Like 1

Share this post


Link to post
Share on other sites

I wonder why AI doesn't spawn inside MBG Kill houses.

 

Because I remember A2, when AI from other scripts used to spawn inside MBG Kill houses. So, I presume MBG has that positioning, path finding thing.

 

My noob question is how to make EOS work with MBG.

Share this post


Link to post
Share on other sites

OK, I have solved my problem by accident and I will share it here. 

 

It works with EM Buildings and MBG Kill Houses.

 

But, the sequence you place the assets matter.

 

1) First delete all markers.

2) Then place the buildings you want.

3) Only as the last step, add the markers.

  • Thanks 1

Share this post


Link to post
Share on other sites
[2,1,250,WEST]

Instead of WEST, what should be the world for independents? GUERRILLA, INDEP, INDEPENDENT, INDEPENDENTS?

Share this post


Link to post
Share on other sites
46 minutes ago, quickdagger said:

Instead of WEST, what should be the world for independents? GUERRILLA, INDEP, INDEPENDENT, INDEPENDENTS?

 

29 minutes ago, GEORGE FLOROS GR said:

independent

:yeahthat:

 

However, it depends on what you set up in the unitPools.sqf.

Let me explain:

You could have a FIA WEST faction ( blue dots on map) if you use

Spoiler

null = [["marker"],[3,1,75],[3,1,90],[0,0],[1,1,75],[0],[0,0],[4,1,500,WEST,FALSE,FALSE]] call EOS_Spawn;

where the 4 in the [4,1,500,EAST,FALSE,FALSE]] part of the code iswhat you have in the unitPools.sqf.

EXAMPLE:
// WEST FIA FACTION
	if (_faction==4) then {
	_InfPool=	["B_G_engineer_F","B_G_medic_F","B_G_officer_F","B_G_Soldier_A_F","B_G_Soldier_AR_F","B_G_Soldier_exp_F","B_G_Soldier_F","B_G_Soldier_GL_F","B_G_Soldier_LAT_F","B_G_Soldier_lite_F","B_G_Soldier_M_F","B_G_Soldier_SL_F","B_G_Soldier_TL_F"];	
	_ArmPool=	[];
	_MotPool=	["B_G_Offroad_01_F","B_G_Offroad_01_armed_F","B_G_Van_01_transport_F","B_G_Van_01_fuel_F"];
	_ACHPool=	[];
	_CHPool=	[];
	_uavPool=	[];
	_stPool=	["B_G_Mortar_01_F"];
	_shipPool=	["B_G_Boat_Transport_01_F"];
	_diverPool=	[];
	_crewPool=	[];
	_heliCrew=	[];
};

 

Or an INDEPENDENT FIA (green dots on map) if:

Spoiler

null = [["marker"],[3,1,75],[3,1,90],[0,0],[1,1,75],[0],[0,0],[4,1,500,INDEPENDENT,FALSE,FALSE]] call EOS_Spawn;

NOTE: by changing from WEST to INDEPENDANT but keeping the same "4" as before, you'll spawm the same FIA units but in the INDEPENDENT /GUERRILLA side.

 

Same if you want an OPFOR/EAST FIA factions, set up your code accordingly.

 

I hope I was clear enough.

 

PS: if you know already all this...then sorry! HAHAHAHAHa

  • Like 1
  • Thanks 1

Share this post


Link to post
Share on other sites
1 hour ago, zagor64bz said:

:yeahthat:

 

For everyone who want to get easy the classnames of the units :

 

You can open the editor and place the units you want , group them to the Player unit  and in the init of the player you add :

grpclasses = []; {hint format["%1",(typeOf  _x)]; grpclasses = grpclasses + [(typeOf _x)]; sleep 1} foreach units group this; copyToClipboard format["%1",grpclasses];

 

If there is anyone who has something better , please quote this .

 

Thanks !

  • Like 1

Share this post


Link to post
Share on other sites
Quote

you'll spawm the same FIA units but in the INDEPENDENT /GUERRILLA side.

 

I got it. Thank you Zagor.

 

For example, I could create a blue NATO version of CSAT this way, right?

 

Floros,

 

I have grouped a CSAT soldier to a NATO player and then pasted the code into the init field of the NATO player. Bang! CSAT became blue NATO. Nice approach!

 

It has all lead me to think whether would it be possible to have a white list item or uniform that, when you dress, you become another faction. You know, to work like spy clothes for an infiltration mission or something. Or, to kill the enemy and then use their clothes to enter a base for example.

 

I have found this:

https://forums.bohemia.net/forums/topic/171723-espionage-script/

 

But the links are broken and, it is from 2014 so, I wonder whether all those stuff would still work after all game updates through these years.

 

I believe I am not being off topic because I want to test how it is to trigger an EOS marker spawning CSAT while I am using CSAT uniforms and, how it is to trigger an EOS marker spawning NATO forces while I am using NATO uniforms.  Or vice-versas. 

 

 

Share this post


Link to post
Share on other sites

Now I see another reason for the disguise thing.

 

If enemy spawn is triggered by distance to the player then, the player can not use the UAV to recon deep behind enemy lines. So, that disguise might be the way to recon.

 

It might be nice to spy 3 enemy bases and then tell in which one the friendly POW's are located.

 

And/or to make the UAV to behave like a player?

Share this post


Link to post
Share on other sites
36 minutes ago, quickdagger said:

And/or to make the UAV to behave like a player?

Dude..look at few post above yours...page 53.....

@sabot10.5mm was nice enough to post his snippet...  

 

PS: It's always wise to search the topic before asking...you may find what you're looking for.:f:

Share this post


Link to post
Share on other sites
On 20/1/2018 at 4:13 PM, sabot10.5mm said:

made small addiction since I like my uavs to activate eos


[] spawn 
{	
private "_pos","_list1","_pos1";	

while {true} do
{
list1 = {};
_pos = getpos player;			
_pos1 = getConnectedUAV player;
list1 = _pos nearObjects ["EmptyDetector", 700];
if !(isNull _pos1) then {_pos = getConnectedUAV player; _list1 = _pos nearObjects ["EmptyDetector", 1000]; list1 append _list1;};	
//systemChat format ["UAV: %1",list1];	
if (count (list1) > 0) then 
{
{
_x enableSimulation true;
} forEach list1;
};

sleep 5;
};
};

[] spawn 
{
while {true} do
{
waituntil {sleep 3;(count (list1) == 0)};
sleep 1;
//systemChat format ["UAV: hi"];	
_alltriggers = allMissionObjects "EmptyDetector";
{
_x enableSimulation false;
} forEach _alltriggers;
waituntil {sleep 3;(count (list1) > 0)};
};
};

this script allows uavs to activate eos. the code that makes it happen is this


 {_actCond="{vehicle _x in thisList && isplayer _x || ({_player = _x; {getConnectedUAV _player == _x} count [uav, uav1, uav2, uav3] > 0} count allPlayers > 0 && ({_x in thislist} count [uav, uav1, uav2, uav3] > 0))} count allUnits > 0"; };

eos_core

  Reveal hidden contents

if (!isServer) exitWith {};
private ["_newpos","_cargoType","_vehType","_dGrp","_mkrAgl","_side","_bGroup","_civZone","_fGrp","_fSize","_fGrps","_eGrp","_eGrps","_dGrps","_aMin","_aSize","_aGrps","_aGrp","_bMin","_units","_bSize","_bGrps","_bGrp","_trig","_cache","_grp","_crew","_vehicle","_actCond","_mAN","_mAH","_distance","_mA","_settings","_cGrp","_cSize","_cGrps","_taken","_clear","_enemyFaction","_faction","_n","_eosAct","_eosActivated","_debug","_mkr","_mPos","_mkrX","_mkrY"];

_mkr=(_this select 0);_mPos=markerpos(_this select 0);
_mkrX=getMarkerSize _mkr select 0;
_mkrY=getMarkerSize _mkr select 1;
_mkrAgl=markerDir _mkr;
_a=(_this select 1);_aGrps=_a select 0;_aSize=_a select 1;_aMin=_aSize select 0;
_b=(_this select 2);_bGrps=_b select 0;_bSize=_b select 1;_bMin=_bSize select 0;
_c=(_this select 3);_cGrps=_c select 0;_cSize=_c select 1;
_d=(_this select 4);_dGrps=_d select 0;_eGrps=_d select 1;_fGrps=_d select 2;_fSize=_d select 3;
_settings=(_this select 5);_faction=_settings select 0;_mA=_settings select 1;_distance=_settings select 2;_side=_settings select 3;
_heightLimit=if (count _settings > 4) then {_settings select 4} else {false};
_debug=if (count _settings > 5) then {_settings select 5} else {false};
_cache= if (count _this > 6) then {_this select 6} else {false};


 if (_side==EAST) then {_enemyFaction="east";_civZone=false;};
 if (_side==WEST) then {_enemyFaction="west";_civZone=false;};
 if (_side==INDEPENDENT) then {_enemyFaction="guer";_civZone=false;};
 if (_side==CIVILIAN) then {_enemyFaction="civ";_civZone=true;};

 if (_mA==0) then {_mAH = 1;_mAN = 0.5;};
 if (_mA==1) then {_mAH = 0;_mAN = 0;};
 if (_mA==2) then {_mAH = 0.5;_mAN = 0.5;};

// INITIATE ZONE
_trig=format ["EOSTrigger%1",_mkr];


if (!_cache) then {
 if ismultiplayer then {
   if (_heightLimit) then
   {_actCond="{vehicle _x in thisList && isplayer _x && ((getPosATL _x) select 2) < 5} count playableunits > 0";
       }else
       {_actCond="{vehicle _x in thisList && isplayer _x} count playableunits > 0";
  };}else{
   if (_heightLimit) then
      {_actCond="{vehicle _x in thisList && isplayer _x && ((getPosATL _x) select 2) < 5  } count allUnits > 0";
        }else
 
           {_actCond="{vehicle _x in thisList && isplayer _x || ({_player = _x; {getConnectedUAV _player == _x} count [uav, uav1, uav2, uav3] > 0} count allPlayers > 0 && ({_x in thislist} count [uav, uav1, uav2, uav3] > 0))} count allUnits > 0"; };};
  _eosActivated = createTrigger ["EmptyDetector",_mPos];
  _eosActivated = createTrigger ["EmptyDetector",_mPos];
  _eosActivated setTriggerArea [(_distance+_mkrX),(_distance+_mkrY),_mkrAgl,FALSE];
  _eosActivated setTriggerActivation ["ANY","PRESENT",true];
  _eosActivated setTriggerTimeout [1, 1, 1, true];
  _eosActivated setTriggerStatements [_actCond,"",""];
  
   server setvariable [_trig,_eosActivated]; 
     }else{
    _eosActivated=server getvariable _trig; 
     };
  
     _mkr setmarkerAlpha _mAN;
      if (!(getmarkercolor _mkr == VictoryColor)) then  //IF MARKER IS GREEN DO NOT CHANGE COLOUR
       {
      _mkr setmarkercolor hostileColor;
       };

waituntil {triggeractivated _eosActivated}; //WAIT UNTIL PLAYERS IN ZONE
if (!(getmarkercolor _mkr == "colorblack"))then {
 if (!(getmarkercolor _mkr == VictoryColor)) then {_mkr setmarkerAlpha _mAH;};

// SPAWN HOUSE PATROLS
 for "_counter" from 1 to _aGrps do {
 if (isnil "_aGrp") then {_aGrp=[];};
  if (_cache) then {
    _cacheGrp=format ["HP%1",_counter];
    _units=_eosActivated getvariable _cacheGrp; 
      _aSize=[_units,_units];
      _aMin=_aSize select 0;
       if (_debug)then{player sidechat format ["ID:%1,restore - %2",_cacheGrp,_units];};
       };
        if (_aMin > 0) then {
          _aGroup=[_mPos,_aSize,_faction,_side] call EOS_fnc_spawngroup; 
          if (!surfaceiswater _mPos) then {
           0=[_mPos,units _aGroup,_mkrX,0,[0,20],true,true] call shk_fnc_fillhouse;
            }else{
            0 = [_aGroup,_mkr] call EOS_fnc_taskpatrol;
             };
            _aGrp set [count _aGrp,_aGroup];
            0=[_aGroup,"INFskill"] call eos_fnc_grouphandlers;
if (_debug) then {PLAYER SIDECHAT (format ["Spawned House Patrol: %1",_counter]);0= [_mkr,_counter,"House Patrol",getpos (leader _aGroup)] call EOS_debug};
            };
  };
  
// SPAWN PATROLS
 for "_counter" from 1 to _bGrps do {
 if (isnil "_bGrp") then {_bGrp=[];};
  if (_cache) then {
    _cacheGrp=format ["PA%1",_counter];
    _units=_eosActivated getvariable _cacheGrp; 
     _bSize=[_units,_units];
     _bMin=_bSize select 0;
     if (_debug)then{player sidechat format ["ID:%1,restore - %2",_cacheGrp,_units];};
      };
       if (_bMin > 0) then { 
         _pos = [_mkr,true] call SHK_pos;   
         _bGroup=[_pos,_bSize,_faction,_side] call EOS_fnc_spawngroup;
          0 = [_bGroup,_mkr] call EOS_fnc_taskpatrol;
          _bGrp set [count _bGrp,_bGroup];
          
          0=[_bGroup,"INFskill"] call eos_fnc_grouphandlers;
if (_debug) then {PLAYER SIDECHAT (format ["Spawned Patrol: %1",_counter]);0= [_mkr,_counter,"patrol",getpos (leader _bGroup)] call EOS_debug};
            };
  }; 
 
//SPAWN LIGHT VEHICLES
 for "_counter" from 1 to _cGrps do { 
 if (isnil "_cGrp") then {_cGrp=[];}; 
 
  _newpos=[_mkr,50] call EOS_fnc_findSafePos;
   if (surfaceiswater _newpos) then {_vehType=8;_cargoType=10;}else{_vehType=7;_cargoType=9;};
 
     _cGroup=[_newpos,_side,_faction,_vehType]call EOS_fnc_spawnvehicle;
    if ((_cSize select 0) > 0) then{
      0=[(_cGroup select 0),_cSize,(_cGroup select 2),_faction,_cargoType] call eos_fnc_setcargo;
      };
      
       0=[(_cGroup select 2),"LIGskill"] call eos_fnc_grouphandlers;
        0 = [(_cGroup select 2),_mkr] call EOS_fnc_taskpatrol;
        _cGrp set [count _cGrp,_cGroup];   
        
if (_debug) then {player sidechat format ["Light Vehicle:%1 - r%2",_counter,_cGrps];0= [_mkr,_counter,"Light Veh",(getpos leader (_cGroup select 2))] call EOS_debug};
  }; 
  
//SPAWN ARMOURED VEHICLES
 for "_counter" from 1 to _dGrps do {
 if (isnil "_dGrp") then {_dGrp=[];};
 
  _newpos=[_mkr,50] call EOS_fnc_findSafePos;
   if (surfaceiswater _newpos) then {_vehType=8;}else{_vehType=2;};
   
     _dGroup=[_newpos,_side,_faction,_vehType]call EOS_fnc_spawnvehicle;
     
      0=[(_dGroup select 2),"ARMskill"] call eos_fnc_grouphandlers;
      0 = [(_dGroup select 2),_mkr] call EOS_fnc_taskpatrol;
       _dGrp set [count _dGrp,_dGroup];
       
if (_debug) then {player sidechat format ["Armoured:%1 - r%2",_counter,_dGrps];0= [_mkr,_counter,"Armour",(getpos leader (_dGroup select 2))] call EOS_debug};
  };
  
//SPAWN STATIC PLACEMENTS
 for "_counter" from 1 to _eGrps do {
  if (surfaceiswater _mPos) exitwith {};
  if (isnil "_eGrp") then {_eGrp=[];};
    
  _newpos=[_mkr,50] call EOS_fnc_findSafePos;
   
     _eGroup=[_newpos,_side,_faction,5]call EOS_fnc_spawnvehicle;
  
      0=[(_eGroup select 2),"STAskill"] call eos_fnc_grouphandlers;
       _eGrp set [count _eGrp,_eGroup];
       
if (_debug) then {player sidechat format ["Static:%1",_counter];0= [_mkr,_counter,"Static",(getpos leader (_eGroup select 2))] call EOS_debug};
  }; 
  
//SPAWN CHOPPER
 for "_counter" from 1 to _fGrps do {
 if (isnil "_fGrp") then {_fGrp=[];}; 
  if ((_fSize select 0) > 0) then {_vehType=4}else{_vehType=3};
    _newpos = [(markerpos _mkr), 1500, random 360] call BIS_fnc_relPos; 
      _fGroup=[_newpos,_side,_faction,_vehType,"fly"]call EOS_fnc_spawnvehicle; 
      _fGrp set [count _fGrp,_fGroup];
      
      
if ((_fSize select 0) > 0) then {
 _cargoGrp = createGroup _side;
  0=[(_fGroup select 0),_fSize,_cargoGrp,_faction,9] call eos_fnc_setcargo;
   0=[_cargoGrp,"INFskill"] call eos_fnc_grouphandlers;
  _fGroup set [count _fGroup,_cargoGrp];
   null = [_mkr,_fGroup,_counter] execvm "eos\functions\TransportUnload_fnc.sqf";
    }else{
     _wp1 = (_fGroup select 2) addWaypoint [(markerpos _mkr), 0]; 
     _wp1 setWaypointSpeed "FULL"; 
     _wp1 setWaypointType "SAD";};
   
      0=[(_fGroup select 2),"AIRskill"] call eos_fnc_grouphandlers;
   
if (_debug) then {player sidechat format ["Chopper:%1",_counter];0= [_mkr,_counter,"Chopper",(getpos leader (_fGroup select 2))] call EOS_debug};
   }; 


   
//SPAWN ALT TRIGGERS 
   _clear = createTrigger ["EmptyDetector",_mPos];
   _clear setTriggerArea [_mkrX,_mkrY,_mkrAgl,FALSE];
   _clear setTriggerActivation [_enemyFaction,"NOT PRESENT",true];
   _clear setTriggerStatements ["this","",""];
    _taken = createTrigger ["EmptyDetector",_mPos];
    _taken setTriggerArea [_mkrX,_mkrY,_mkrAgl,FALSE];
    _taken setTriggerActivation ["ANY","PRESENT",true];
    _taken setTriggerStatements ["{vehicle _x in thisList && isplayer _x && ((getPosATL _x) select 2) < 5} count allUnits > 0","",""];
_eosAct=true; 
while {_eosAct} do
 {
 // IF PLAYER LEAVES THE AREA OR ZONE DEACTIVATED
 if (!triggeractivated _eosActivated || getmarkercolor _mkr == "colorblack") exitwith
  {
  if (_debug) then {if (!(getmarkercolor _mkr == "colorblack")) then {hint "Restarting Zone AND deleting units";}else{hint "EOS zone deactivated";};};  
//CACHE LIGHT VEHICLES
 if (!isnil "_cGrp") then
    {    
      { _vehicle = _x select 0;_crew = _x select 1;_grp = _x select 2;
         if (!alive _vehicle || {!alive _x} foreach _crew) then { _cGrps= _cGrps - 1;}; 
            {deleteVehicle _x} forEach (_crew);  
              if (!(vehicle player == _vehicle)) then {{deleteVehicle _x} forEach[_vehicle];};            
                   {deleteVehicle _x} foreach units _grp;deleteGroup _grp;
      }foreach _cGrp;
if (_debug) then {player sidechat format ["ID:c%1",_cGrps];};};
           
// CACHE ARMOURED VEHICLES
  if (!isnil "_dGrp") then
    {    
      { _vehicle = _x select 0;_crew = _x select 1;_grp = _x select 2;
         if (!alive _vehicle || {!alive _x} foreach _crew) then {_dGrps= _dGrps - 1;}; 
            {deleteVehicle _x} forEach (_crew);  
              if (!(vehicle player == _vehicle)) then {{deleteVehicle _x} forEach[_vehicle];};            
                   {deleteVehicle _x} foreach units _grp;deleteGroup _grp;
      }foreach _dGrp;
if (_debug) then {player sidechat format ["ID:c%1",_dGrps];};};

// CACHE PATROL INFANTRY     
 if (!isnil "_bGrp") then
    {  _n=0;     
      { _n=_n+1;_units={alive _x} count units _x;_cacheGrp=format ["PA%1",_n];
 if (_debug) then{player sidechat format ["ID:%1,cache - %2",_cacheGrp,_units];};
      _eosActivated setvariable [_cacheGrp,_units];  
      {deleteVehicle _x} foreach units _x;deleteGroup _x;
      }foreach _bGrp;
    };
      
// CACHE HOUSE INFANTRY
 if (!isnil "_aGrp") then
    {  _n=0;     
      { _n=_n+1;_units={alive _x} count units _x;_cacheGrp=format ["HP%1",_n];
 if (_debug) then{player sidechat format ["ID:%1,cache - %2",_cacheGrp,_units];};
      _eosActivated setvariable [_cacheGrp,_units];  
      {deleteVehicle _x} foreach units _x;deleteGroup _x;
      }foreach _aGrp;
    };
     
// CACHE MORTARS   
 if (!isnil "_eGrp") then
    {   
      { _vehicle = _x select 0;_crew = _x select 1;_grp = _x select 2;
         if (!alive _vehicle || {!alive _x} foreach _crew) then {_eGrps= _eGrps - 1;};   
              {deleteVehicle _x} forEach (_crew);
               if (!(vehicle player == _vehicle)) then {{deleteVehicle _x} forEach[_vehicle];};             
                 {deleteVehicle _x} foreach units _grp;deleteGroup _grp;
      }foreach _eGrp;}; 
      
// CACHE HELICOPTER TRANSPORT
 if (!isnil "_fGrp") then
    {   
      { _vehicle = _x select 0;_crew = _x select 1;_grp = _x select 2; _cargoGrp = _x select 3;
         if (!alive _vehicle || {!alive _x} foreach _crew) then {_fGrps= _fGrps - 1;};   
              {deleteVehicle _x} forEach (_crew);
               if (!(vehicle player == _vehicle)) then {{deleteVehicle _x} forEach[_vehicle];};             
                 {deleteVehicle _x} foreach units _grp;deleteGroup _grp;
                 if (!isnil "_cargoGrp") then {
                 {deleteVehicle _x} foreach units _cargoGrp;deleteGroup _cargoGrp;};
                 
      }foreach _fGrp;}; 
      
_eosAct=false;
if (_debug) then {hint "Zone Cached";};
};
 if (triggeractivated _clear and triggeractivated _taken and !_civZone)exitwith
   {// IF ZONE CAPTURED BEGIN CHECKING FOR ENEMIES
    _cGrps=0;_aGrps=0;_bGrps=0;_dGrps=0;_eGrps=0;_fGrps=0;  
    while {triggeractivated _eosActivated AND !(getmarkercolor _mkr == "colorblack")} do
      {
       if (!triggeractivated _clear) then
       {
        _mkr setmarkercolor hostileColor;
        _mkr setmarkerAlpha _mAH;
        if (_debug) then {hint "Zone Lost";};
          }else{
           _mkr setmarkercolor VictoryColor;
           _mkr setmarkerAlpha _mAN;
           if (_debug) then {hint "Zone Captured";};
           };
    sleep 1;};
// PLAYER LEFT ZONE    
_eosAct=false;  
   };sleep 0.5;};

deletevehicle _clear;deletevehicle _taken; 
 
if (!(getmarkercolor _mkr == "colorblack")) then { 
 null = [_mkr,[_aGrps,_aSize],[_bGrps,_bSize],[_cGrps,_cSize],[_dGrps,_eGrps,_fGrps,_fSize],_settings,true] execVM "eos\core\eos_core.sqf";
 }else{_Mkr setmarkeralpha 0;};
 };

 

 

Share this post


Link to post
Share on other sites
On 5/4/2018 at 4:03 AM, quickdagger said:

I have grouped a CSAT soldier to a NATO player and then pasted the code into the init field of the NATO player. Bang! CSAT became blue NATO. Nice approach!

 

To clarify, the code is just returning the classnames of the grouped units for scripting purposes. The units changing sides is entirely a function of them being grouped to the player unit. Or any unit, really - group them to a dummy unit of the desired side and set its probability of presence to 0%.

Share this post


Link to post
Share on other sites
10 hours ago, Harzach said:

 

To clarify, the code is just returning the classnames of the grouped units for scripting purposes. The units changing sides is entirely a function of them being grouped to the player unit. Or any unit, really - group them to a dummy unit of the desired side and set its probability of presence to 0%.

:yeahthat:

Share this post


Link to post
Share on other sites

Thank you dudes!

 

So, that code is even better than I thought.

 

Oh sorry I haven't checked that one.

 

Share this post


Link to post
Share on other sites

Hey guys I am wondering if there a way to make EOS persistent, as in marker progress is kept green after restart?

Share this post


Link to post
Share on other sites
4 hours ago, CamperCombo said:

Hey guys I am wondering if there a way to make EOS persistent, as in marker progress is kept green after restart?

It's already like that... When you exit&save the game you'll find the green/red areas as you left it..

 

That in SP perhaps.Not familiar with MP environment though .

Share this post


Link to post
Share on other sites

Hi pros!

 

I am trying to spawn snipers in the open but, the problem is that they keep moving, making it too easy to spot them. I want them to stay prone and static. Is there a way?

 

I don't want to use house groups.

null = [["sniper1"],[0,0],[5,0],[0,0],[0],[0],[0,0],[5,1,1500,EAST,TRUE]] call EOS_Spawn;

 

Share this post


Link to post
Share on other sites
2 hours ago, quickdagger said:

Hi pros!

 

I am trying to spawn snipers in the open but, the problem is that they keep moving, making it too easy to spot them. I want them to stay prone and static. Is there a way?

 

I don't want to use house groups.


null = [["sniper1"],[0,0],[5,0],[0,0],[0],[0],[0,0],[5,1,1500,EAST,TRUE]] call EOS_Spawn;

 

https://community.bistudio.com/wiki/setUnitPos

 

Set the prone and set behavior as you spawn them. 

Share this post


Link to post
Share on other sites

I have copied the EOS files into a different mission and got to the point where it gives me an error in Line 4 of eos_core.sqf - Type Number, expected String. Anybody knows why that is and how to get rid of the problem? 


EDIT: has a |#| in front of the markerpos in this line:

_mkr=(_this select 0);_mPos=markerpos(_this select 0);

 

Edited by SpacePilotMax

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

×