Jump to content
bangabob

Enemy occupation system (eos)

Recommended Posts

Hello everybody.

I have the problem in the default setting, the AI either mutually shoots, happens if I except the page EAST Activate setting and when I take WEST nothing happens I take the first to the AI.

Here a CFG: OpenMe

 

null =[["EOSzone1"],[2,1],[2,2],[1,3],[1],[2],[1,2],[1,1,250,WEST,FALSE,FALSE]] call EOS_Spawn;

 

Can someone explain to me how the AI shoots himself when standing on EAST?

 

Thx for Help

Share this post


Link to post
Share on other sites

I've had that same issue before, but it usually happens when I test client-side (singleplayer or client hosting).  I think it's something to do with a script or line of code not executing fast enough due to the AI spawning and slowing down how it processes/computes. Also, you should correct that line of code to:

null =[["EOSzone1"],[2,1,100],[2,2,100],[1,3,100],[1,100],[2,100],[1,2,100],[1,1,250,WEST,FALSE,FALSE]] call EOS_Spawn;

 

The "100" values just mean it's a 100% chance of it spawning that group, feel free to lower the chance if you want.

  • Like 1

Share this post


Link to post
Share on other sites

I've had that same issue before, but it usually happens when I test client-side (singleplayer or client hosting).  I think it's something to do with a script or line of code not executing fast enough due to the AI spawning and slowing down how it processes/computes. Also, you should correct that line of code to:

null =[["EOSzone1"],[2,1,100],[2,2,100],[1,3,100],[1,100],[2,100],[1,2,100],[1,1,250,WEST,FALSE,FALSE]] call EOS_Spawn;

 

The "100" values just mean it's a 100% chance of it spawning that group, feel free to lower the chance if you want.

Hi, thanks for the reply. I have it set just won the AI shoot each other off or do nothing.

 

null =[["EOSzone1"],[2,1,100],[2,2,100],[1,3,100],[1,100],[2,100],[1,2,100],[1,1,100,WEST,FALSE,FALSE]] call EOS_Spawn;

 

What should I do that the AI does not kill each other?

 

Big Thx for Help.

Share this post


Link to post
Share on other sites

Also you dont need the "count _areas" command since the foreach command won't finish until all the colors turn green

{
waituntil {getMarkerColor _x == "ColorGreen";};
}foreach _areas;
//PUT REWARDS ECT HERE

 

How can i check when only one marker and not all of them has changed color from my array?

Share this post


Link to post
Share on other sites

In your trigger or whatever, use

getMarkerColor "your marker name" == "ColorGreen";

Share this post


Link to post
Share on other sites

 

In your trigger or whatever, use

getMarkerColor "your marker name" == "ColorGreen";

 

Thanks Tay, i did read a lot (not all) of the thread and that is mentioned a lot, but lets say i have over 200 markers, i have them listed in an array like so _areas = ["TasksSmall","TasksSmall_1","TasksSmall_2"....]; //list of markers

 

What is the best way to continuasly check each time one has changed color and run a script.

Share this post


Link to post
Share on other sites

Why are my AI shooting at each other?

This has happened to me sometimes if they don't spawn fast enough [sometimes when hosting client side instead of on a server] or if you have spawned CSAT units but set them as INDEPENDENT.

Share this post


Link to post
Share on other sites

This has happened to me sometimes if they don't spawn fast enough [sometimes when hosting client side instead of on a server] or if you have spawned CSAT units but set them as INDEPENDENT.

Spawned FIA and set them as independent and CSAT, they keep doing it...

Share this post


Link to post
Share on other sites

Hello My Server uns an RPT Log and The Only Error i get is

 

waituntil {triggeractivated _eosActivated};    
if (!(getmarkercolor _m>
  Error position: <_eosActivated};    
if (!(getmarkercolor _m>
  Error Undefined variable in expression: _eosactivated
File mpmissions\__cur_mp.Kunduz\eos\core\eos_core.sqf, line 59
Error in expression <eColor;
};

 

 

What could be wrong ? i Never Changed Something in that eos_core.sqf

Share this post


Link to post
Share on other sites

Hey any EOS guru's..

 

Some random questions:

 

I was wondering if there is a way to somehow cap how many units are spawned on the map at any given time, the reason is i have markers next to each other and when moving from one to another then obviously both are activated resulting in to many units spawned = lag.

 

Is it possible to define a blacklist marker somehow, i have a player who spawns randomly inside an EOS marker, and want to avoid enemy units spawning too close, so i was thinking some type pf blacklist marker attached to player?

Share this post


Link to post
Share on other sites

*** EDIT ***

 

I had trouble a few days ago going about the height limit and I figured it out (at least in the editor). Here are my lines:

 

 

OpenMe.sqf:

 

For this my actual array is between 100-199 but for the purpose of this example I cut it short to just 4 grids in the array but the point should be made regardless.

// 100-199 // House Patrol (2-4) + Street Patrol 2-4)
null = [["EOSinf_100","EOSinf_101","EOSinf_102","EOSinf_103"],[1,1,100],[0,0],[0,0],[0],[0],[0,0,0],[0,0,300,EAST,TRUE,FALSE]] call EOS_Spawn;

eos_core.sqf

 

lines 30-40

if (!_cache) then {
	if ismultiplayer then {
			if (_heightLimit) then 
			{_actCond="{vehicle _x in thisList && isplayer _x && ((getPosATL _x) select 2) < 500} 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} count allUnits > 0";};};

With the above configuration the height limit works just fine. 

 

-----

 

The problem I'm running into is the template that works just fine if I self host however it DOES NOT WORK when I'm running it on my dedicated server. When hosting on my dedicated the grids are grey as if the script is somehow broken or not recognizing a dedicated server host. Anyone?

Share this post


Link to post
Share on other sites

*** EDIT ***

 

I had trouble a few days ago going about the height limit and I figured it out (at least in the editor). Here are my lines:

 

 

OpenMe.sqf:

 

For this my actual array is between 100-199 but for the purpose of this example I cut it short to just 4 grids in the array but the point should be made regardless.

// 100-199 // House Patrol (2-4) + Street Patrol 2-4)
null = [["EOSinf_100","EOSinf_101","EOSinf_102","EOSinf_103"],[1,1,100],[0,0],[0,0],[0],[0],[0,0,0],[0,0,300,EAST,TRUE,FALSE]] call EOS_Spawn;

eos_core.sqf

 

lines 30-40

if (!_cache) then {
	if ismultiplayer then {
			if (_heightLimit) then 
			{_actCond="{vehicle _x in thisList && isplayer _x && ((getPosATL _x) select 2) < 500} 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} count allUnits > 0";};};

With the above configuration the height limit works just fine. 

 

-----

 

The problem I'm running into is the template that works just fine if I self host however it DOES NOT WORK when I'm running it on my dedicated server. When hosting on my dedicated the grids are grey as if the script is somehow broken or not recognizing a dedicated server host. Anyone?

chances for a packed upgrade?

Share this post


Link to post
Share on other sites

For some reason in Multiplayer, when a player dies on my map; a cluster fuck of soldiers spawn at the corner of the map causing a HUGE amount of lag. Is there a way to fix this?

 

---EDIT---

 

Nevermind, I just had to disable AI's for the Player positions and it magically fixed itself

Share this post


Link to post
Share on other sites

ANOTHER Question that hopefully some one can answer:

Is there a way you can have different colored EOS Map markers to represent which side controls which areas? (CSAT = Red, NATO = Blue, AAF = Green)

 

To Elaborate:

Obviously changing the colors of the markers on the 3D/2D Editor map won't change it, cause its a script; but is there a script code that makes the map marker names specific colors? ("GUERinf_5" = Green Marker, "EASTheav_11" = Red Marker, etc...)

 

Thanks Mates!  ;)

Share this post


Link to post
Share on other sites

ANOTHER Question that hopefully some one can answer:

Is there a way you can have different colored EOS Map markers to represent which side controls which areas? (CSAT = Red, NATO = Blue, AAF = Green)

 

To Elaborate:

Obviously changing the colors of the markers on the 3D/2D Editor map won't change it, cause its a script; but is there a script code that makes the map marker names specific colors? ("GUERinf_5" = Green Marker, "EASTheav_11" = Red Marker, etc...)

 

Thanks Mates!  ;)

Are they all going to be enemies? Well I was assisted in this too so here you go. They are all enemies for me.

 

In the open me change colors to the following.

victoryColor = "colorWhite";  //or whatever since you are using green for AAF

hostileColor = ["colorRed","colorBlue","colorGreen"];

 

In your eos_core or anywhere else... when the marker color is setting the _mrk to hostile color you will need to have something like this.

/*_mkr setmarkercolor hostileColor; THIS COMMENTED OUT */

_mkr setMarkerColor ( hostileColor select (_side call BIS_fnc_sideID ));

 

I can help you get it working if you want to share your mission. Up to you.

 

dubl

Share this post


Link to post
Share on other sites

is there any way that the Bastion is attacked from a specific direction?

 

Also interested in this, a solution would be that units that will attack Bastion spawn on a certain marker, any way to do this?

 

**** FIXED ****

 

After aprox 10 seconds I decided I shouldn't be so lazy and actually take a look at the code, and so I found this

_pos = [_mPos, _Placement, random 360] call BIS_fnc_relPos;

In eos\core\b_core.sqf.

 

After some mins of checking it out, I found out what call BIS_fnc_relPos does and the random 360 made some sense, and so I tried changing it to random [-45,0,45] so the script would spawn the units from -45° to 45°, 0° being North.

In the end it looks like this

_pos = [_mPos, _Placement, random [-45,0,45]] call BIS_fnc_relPos;

I've tested it a few times and it looks like it works, just be careful because you'll have to modify this part

random 360

for this

random[what,you,want]

In all the cases (spawn patrol, vehicle, armored, etc).

 

Be careful not to touch the

(_Placement +200)

part, unless you want to :P

 

If I wasn't clear enough please PM me, I'd be happy to help.

 

Cheers!

 

** NOTE **

You could also use

round(random 90) -45

I haven't tested this thou, I found this after taking a look at the wiki.

Share this post


Link to post
Share on other sites
For some reason in Multiplayer, when a player dies on my map; a cluster fuck of soldiers spawn at the corner of the map causing a HUGE amount of lag. Is there a way to fix this?

Got same problem, just not only when player dies, but if player just comes anywhere near that point.

It seems like all soldiers from UnitPools.sqf spawning at same time.

 

=== EDIT ===

 

Found it. Had more EOS spawns in OpenMe.sqf then actual markers on map. Thus all thoe units just spawned at [0,0].

Share this post


Link to post
Share on other sites

Is the BAS working properly right now? I'm asking because all the spawned units simply despawn when the waves are complete no matter what  :blink:

Share this post


Link to post
Share on other sites

this script spawns ai if the player nears a certain marker.  how would one edit it, so that UAVs and the player activate the script? this would allow me to set a uav plane to loiter the marker spawning ai - which would allow me to fly cas without the risk of ai despawning.

Share this post


Link to post
Share on other sites

Hi, I'm trying to use a custom faction with this (CSAT Overhaul), but when the units spawn in the zones, they are deleted after about half a second and re-spawned in different places in the zone until they stop spawning after a short while. Could this be an issue with the CSAT overhaul mod, or is custom unit classnames support broken?

 

The spawn line I'm using is

null = [["MS1","MS2","MS3"],[2,1,100],[2,1,50],[1,1,30],[0,0],[0],[0,0,0],[5,0,350,EAST]] call EOS_Spawn;

where faction number 5 is the CSAT Overhaul faction I defined in the Unit pool sqf.

if (_faction==5) then {
_InfPool= ["TEC_O_Soldier_Urban_AR_F","TEC_O_Medic_Urban_F","TEC_O_Engineer_Urban_F","TEC_O_Soldier_Urban_F","TEC_O_Soldier_Urban_AT_F","TEC_O_Soldier_Urban_M_F"]; 
_ArmPool= ["TEC_VH_Tank_Varsuk_F","TEC_VH_APC_Marid_F","TEC_VH_MRAP_Shar_HMG"];
_MotPool= ["O_G_Offroad_01_armed_F","TEC_VH_MRAP_Abda"];
_ACHPool= ["TEC_VH_Helicopter_Keftar_F"]; //Attack chopper
_CHPool= ["TEC_VH_Helicopter_Orca_F"]; //Transport chopper
_uavPool= ["O_UAV_01_F","O_UAV_02_CAS_F","O_UGV_01_rcws_F"];
_stPool= ["O_Mortar_01_F","O_static_AT_F","O_static_AA_F"];
_shipPool= ["O_Boat_Armed_01_hmg_F","O_Boat_Transport_01_F"];
_diverPool= ["O_diver_exp_F","O_diver_F","O_diver_TL_F"];
_crewPool= ["TEC_O_Crew_Urban_F"]; //Tank crew
_heliCrew= ["TEC_O_Helipilot_F"];
};

 

Edit: Nevermind, it was just a one time occurance because EOS couldn't find any buildings to populate the enemies with where I had placed the test marker :P

Edited by vastiny

Share this post


Link to post
Share on other sites

To prevent issues in the future, change this:

null=[["MS1","MS2","MS3"],[2,1,100],[2,1,50],[1,1,30],[0,0],[0],[0,0,0],[5,0,350,EAST]]call EOS_Spawn;

To this:

null=[["MS1","MS2","MS3"],[2,1,100],[2,1,50],[1,1,30],[0,0],[0,0],[0,0,0],[5,0,350,EAST,FALSE,FALSE]]call EOS_Spawn;

You were missing a couple parameters for two arrays. The two "FALSE,FALSE" parameters are basically "Height Limit,Debug". If you DO want a height limit, AKA air vehicles to be less likely to trigger zones, set it to "TRUE,FALSE"

Share this post


Link to post
Share on other sites

Yeah I understand the last two parameters. Had no idea it was so sensitive in the case of the extra ",0" to be mandatory though :P Thanks!

Share this post


Link to post
Share on other sites

So.. I've spent a whole night reading the 59 pages of this post and nobody seems to have tried to make EOS persistent. Me and my online group have a dedi just for EOS so we want it to be persistent, so I've made it with inidb2. We are still testing but its already working so I thougt I'd let you guys know.. although I think there's probaly nobody interested since no one seemed to even try.

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

×