Jump to content
bangabob

Enemy occupation system (eos)

Recommended Posts

ToM666, i can't answer you that question. :/ Got this all from kylania :D I've got 1 marker for 1 hint, so i can't help you with that one.

Share this post


Link to post
Share on other sites
I'm sure somebody in this thread somewhere already figured this out.

Yeh, that's what I thought. I read through this thread weeks ago and was sure there was something about it in there.

But I couldn't find it when I was looking earlier. I ended up doubting myself and thinking my memory was playing up. It's not getting any better now I am approaching 50 LOL.

---------- Post added at 15:07 ---------- Previous post was at 14:01 ----------

markers = ["markername1","markername2"];

{

getMarkercolor _x == "ColorGreen";

} foreach markers;

Something like that I think, not tried it.

e.g.

markers = ["markername1","markername2"];

if
(
   {
   getMarkercolor _x == "ColorGreen";
   } foreach markers;
)

then

{

hint "all areas captured";

};

Just tried that and it doesn't work.

Yeh me too. It said "]" missing. Thanks for trying though mate :)

ToM666, i can't answer you that question. :/ Got this all from kylania :D I've got 1 marker for 1 hint, so i can't help you with that one.

No problem mate. TBH, I appreciate it any help I get. You guys don't have to help me so when you put yourselves out to try, I really appreciate it.

Share this post


Link to post
Share on other sites

As far as i know, using if & then in a condition box of a trigger isn't that good. Of course i can be wrong about that... ehm... i'll test something and edit this post later.. brb

Share this post


Link to post
Share on other sites
As far as i know, using if & then in a condition box of a trigger isn't that good. Of course i can be wrong about that... ehm... i'll test something and edit this post later.. brb

Okeedoke.

Share this post


Link to post
Share on other sites
As far as i know, using if & then in a condition box of a trigger isn't that good. Of course i can be wrong about that... ehm... i'll test something and edit this post later.. brb

That wasn't for a trigger, that was to do it through a script.

Yeh me too. It said "]" missing. Thanks for trying though mate :)

I fixed that but what I ended up with still didn't work. No errors but it still triggered even when one of the markers in the array was red and not green. I tried this:

sleep 5;

markers = ["marker1","marker2"];

if ( {getMarkercolor _x == "ColorGreen"}foreach markers ) then { hint "all areas captured" };

and this:

sleep 5;

markers = ["marker1","marker2"];

waitUntil {
{
getMarkercolor _x == "ColorGreen";
}foreach markers;
             };

hint "all areas captured";

Neither work, I think I'm making some big mistake here.

I'm not trying this with EOS btw, just 2 markers in the editor, but like I said I'm sure there's already an answer in here somewhere as I remember a few people asking how to do it.

Edited by clydefrog

Share this post


Link to post
Share on other sites

BangaBob

Is there a way to implement this:

suppose there's a group with 6 units on the eos maker. I player go there and kill 2 and get killed. So eos saves, caches only 4, the 4 units alive. Instead of starting the marker with 6 again?

Share this post


Link to post
Share on other sites
That wasn't for a trigger, that was to do it through a script.

I fixed that but what I ended up with still didn't work. No errors but it still triggered even when one of the markers in the array was red and not green. I tried this:

sleep 5;

markers = ["marker1","marker2"];

if ( {getMarkercolor _x == "ColorGreen"}foreach markers ) then { hint "all areas captured" };

and this:

sleep 5;

markers = ["marker1","marker2"];

waitUntil {
{
getMarkercolor _x == "ColorGreen";
}foreach markers;
             };

hint "all areas captured";

Neither work, I think I'm making some big mistake here.

I'm not trying this with EOS btw, just 2 markers in the editor, but like I said I'm sure there's already an answer in here somewhere as I remember a few people asking how to do it.

No problem buddy. Thanks for trying. I did have another look through the 29 pages of this thread then had to go out half way through looking. I'll take another look tomorrow.

Share this post


Link to post
Share on other sites

Sorry if this was asked already, but I'm getting the following error when I preview the mission in the editor.

'... select 3} else {false};

{
_eosMarkers=|#|server getvariable "EOSmarker";
if (isn...'
Error undefined variable in expression server
File c:\Users\...\missions\EOSTest.Stratis\eos\eos_GearBox.sqf, line 9

Is this just because its preview and not hosted? The preview works fine with all the units spawning correctly.

Share this post


Link to post
Share on other sites
Sorry if this was asked already, but I'm getting the following error when I preview the mission in the editor.

'... select 3} else {false};

{
_eosMarkers=|#|server getvariable "EOSmarker";
if (isn...'
Error undefined variable in expression server
File c:\Users\...\missions\EOSTest.Stratis\eos\eos_GearBox.sqf, line 9

Is this just because its preview and not hosted? The preview works fine with all the units spawning correctly.

you seem to be missing a gamelogic called 'server'

Share this post


Link to post
Share on other sites

Neither work, I think I'm making some big mistake here.

Yes, logic in both those statements will always be true. You are basically just putting an if statement around code and not a real condition check.

what you want to do is check if each marker is green with and statements between each. If I wasn't on an iPad right now I'd give a full example.

Share this post


Link to post
Share on other sites

Is there a way to change the waypoints given to the spawned groups? In my mission it seems like each group that spawns migrates towards North East. My goal is to have them kinda linger in a smaller area, even if I make the marker smaller, they still set their patrol waypoint to the northeast and leave the marker area. Am I doin something wrong?

Share this post


Link to post
Share on other sites
Is there a way to change the waypoints given to the spawned groups? In my mission it seems like each group that spawns migrates towards North East. My goal is to have them kinda linger in a smaller area, even if I make the marker smaller, they still set their patrol waypoint to the northeast and leave the marker area. Am I doin something wrong?

I tought i'm the only one with that. Apparently not^^

Share this post


Link to post
Share on other sites
you seem to be missing a gamelogic called 'server'

I just started playing around with the editor, how would I fix that?

Share this post


Link to post
Share on other sites
I just started playing around with the editor, how would I fix that?

Make sure you have a unit that is a player (the editor won't allow you to create a game logic or empty object without establishing a unit as a a player) then create a new unit (same way you created your player) but change the "Side" to "game logic" then just name the game logic "server".

Share this post


Link to post
Share on other sites
Make sure you have a unit that is a player (the editor won't allow you to create a game logic or empty object without establishing a unit as a a player) then create a new unit (same way you created your player) but change the "Side" to "game logic" then just name the game logic "server".

Thank you!

Share this post


Link to post
Share on other sites
Can you use the script below alongside EOS without any problems?

http://www.armaholic.com/page.php?id=18802

I was actually wondering if it would be..unethical?... to use the patrol_VD and patrol_ED sqf files from this handy script http://www.armaholic.com/page.php?id=19832 with EOS. I really like the spawn system and AI reaction from EOS but I really love the patrolling from the AI spawn script. Would anyone have any idea how to implement those into EOS?

Share this post


Link to post
Share on other sites

is there any way to make this script use individual unit classnames instead of squad names in the InfantryPool? It would make it a lot easier for those of us who use mods and it would also allow mission makers more control over who spawns in missions.

Share this post


Link to post
Share on other sites
you should be able to, i'm using it with UPSMON (an "enhanced" version of UPS) and it works pretty much flawless.

Nice one. Thankyou. :cool:

---------- Post added at 06:33 ---------- Previous post was at 05:22 ----------

Just had a look at this UPSMON. Does it work with ArmA3?

Share this post


Link to post
Share on other sites

Hi guys, last night I figured out how to have the 'task complete' thing pop up in the middle of the screen (task notifications), as well as a hint, as well as setting a task complete, and creating and assigning the next task, when a zone marker turns green. I'll post the script tonight.

It would be good to know how to write a script that triggers the end of the mission when you clear all the markers, otherwise the player could end the mission if they go to the last objective first.. since the last objective has the End#1 setting upon completion.

edit - I learned some stuff from this thread (how to make briefing and task notifications)

thread - http://forums.bistudio.com/showthread.php?151534-Task-Completion-Animations&p=2411140#post2411140

For task completion animations I'm using notifications. First you must difine classes in description.ext

class CfgNotifications { 

   class TaskSucceeded 
   { 
       title = "TASK COMPLETED"; 
       iconPicture = "\A3\ui_f\data\map\MapControl\taskicondone_ca.paa"; 
       description = "%1"; 
       color[]={0,255,0,1};
   }; 
   class TaskFailed 
   { 
       title = "TASK FAILED"; 
       iconPicture = "\A3\ui_f\data\map\MapControl\taskiconfailed_ca.paa"; 
       description = "%1"; 
       color[]={255,0,0,1};

   }; 
   class TaskCanceled { 
       title = "TASK CANCELED"; 
       iconPicture = "\A3\ui_f\data\map\MapControl\taskiconcanceled_ca.paa"; 
       description = "%1";
       color[]={255,0,0,1};

   }; 
   class TaskAssigned  { 
       title = "TASK ASSIGNED"; 
       iconPicture = "\A3\ui_f\data\map\Mapcontrol\taskIcon_ca.paa"; 
       description = "%1"; 

   }; 

  class TaskCreated  { 
       title = "TASK CREATED"; 
       iconPicture = "\A3\ui_f\data\map\MapControl\taskiconcreated_ca.paa"; 
       description = "%1"; 

   }; 
};

and then you call it

["TaskSucceeded", ["Attack enemy"]] call bis_fnc_showNotification;

or

["TaskFailed", ["Attack enemy"]] call bis_fnc_showNotification;

and so on.

I'm trying to find the post by Kylania that I used to make it all work. I'll let you know when I find it.

http://forums.bistudio.com/showthread.php?160521-Got-a-little-script-problem&p=2456241&viewfull=1#post2456241

I'm pretty sure this is the line that worked for me:

if (getMarkerColor "marker1" == "ColorGreen") then { Hint "Successfully cleared the town, good job soldiers!";};

Then you add in all other scripts you want to be executed when the marker changes to green before the final };

example:

if (getMarkerColor "marker1" == "ColorGreen") then { Hint "Successfully cleared the town, good job soldiers!";*****ADDITIONAL SCRIPTS IN THIS SPOT*****};

I put in task completed, task notification and create/assign a new task in that spot. In the trigger for the player's last task I put a script that makes the mission end with End#1.

I'll post the actual script tonight, I was up very late but im pretty sure it was all working before I went to bed.

Edited by Drow09

Share this post


Link to post
Share on other sites

Hi Drow09, Have you tried Shuko's shk_taskmaster for A3?

It takes a little getting used to and it appears to be fully JIP compatible, at least from my own testing.

It also still gives the tasks after respawn which has been known to cause issues in some cases.

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

×