Jump to content
Sign in to follow this  
stephen271276

No go opfor area?

Recommended Posts

Is there a way to have a "Safe Zone" for blufor in a mission?

I have a patrol script running and ambient combat but want an area in the city where no opfor will spawn or enter is this possible via a marker?

Share this post


Link to post
Share on other sites

Maybe something like this:

if (!isServer) exitwith {};
private ["_trigger","_area"];

_trigger = _this select 0;

_area = list _trigger;

while {true} do {
   {
       if ((side _x == east) && (_x in _area)) then {
       sleep 5;
       deleteVehicle _x;
   };
   } foreach allunits;
   sleep 5;
};

Share this post


Link to post
Share on other sites

What could be the intention to answer to an eight month old post?

You seem to be as stupid as your avatar looks like... :D

Sorry... ;)

Share this post


Link to post
Share on other sites

Maybe it took that long to make a workable answer? Which still doesn't look perfect wrt indentation :D

Sorry too ;) But it was kinda funny.

Share this post


Link to post
Share on other sites

@ Buliwyf

What could be the intention to post useless nonsense here like you did ?

FPDR

@ CarlGustaffa

You know a better way ?

Why not post it here...

Share this post


Link to post
Share on other sites
What could be the intention to answer to an eight month old post?

You seem to be as stupid as your avatar looks like... :D

Sorry... ;)

Because we asked those editing topics to be diggable even a long time after they were posted, contrary to the others. So no that's not stupid, a little weird maybe but surely useful.

Share this post


Link to post
Share on other sites

Can we help the OP out please.

Edited by dale0404

Share this post


Link to post
Share on other sites

Forum rules:

§10) Do not dig up old threads

Threads older than 4 months should not be dug up unless something significant is being added. If in doubt as to what is "significant", contact a moderator and they will give you their opinion. As always old threads will remain open or be closed at the moderator's discretion. Digging up an old thread simply to ask "any news" is also not acceptable, PM the thread starter or mod leader to ask.

Any questions?

:p

Share this post


Link to post
Share on other sites
Forum rules:

Any questions?

:p

Just read it.

§10) Do not dig up old threads

Threads older than 4 months should not be dug up unless something significant is being added. If in doubt as to what is "significant", contact a moderator and they will give you their opinion. As always old threads will remain open or be closed at the moderator's discretion. Digging up an old thread simply to ask "any news" is also not acceptable, PM the thread starter or mod leader to ask.

Obviously something significant was added here. PERIOD.

Share this post


Link to post
Share on other sites
...unless something significant is being added.

That doesn`t include significant bullshit like that code. E.g.: He didn`t lost any word that he uses a trigger that have to be set to ANY and REPEATEDLY. Otherwise his "script" won`t work or only one time. And how to start the "script"? Where do i have to put it in? How do i start it? What happens to vehicles or planes entering the area? Questions over questions...

And how does it looks like if AI enter a trigger and it will simply be deleted? :eek:

It`s only bullshit answered to an eight months old question.

:cool:

Edited by Buliwyf

Share this post


Link to post
Share on other sites

@ Buliwyf

Sorry, but many of your post's here are pretty useless one-liners like:

...so yeah, i dont care anyway why you are so stubbornly posting stuff here (no other problems ??) without adding any useful (not that i expected anything from you).

My post was just a quick idea (i dont even looked at the date) after searching the forums for a "Safe-Zone" script. I thought maybe someone would post a better version or idea...but clearly not you. :o

Goodnight.

Edited by Wiggum

Share this post


Link to post
Share on other sites

I recently did it this way, much better then just deleting them:

You will need two triggers with (most likely) the same size !

One with condition OPFOR present and repeatedly, name it a1.

The other one grouped with the player group, repeatedly, with the name a2 and On Act:

nul=[a1, a2, mygroup] execVM "safeZone.sqf";

Now name the player group with mygroup = group this inside the leaders init.

if (!isServer) exitwith {};

private ["_trigger","_area","_grpPlayer","_trigger2","_area2"];

_trigger = _this select 0;
_trigger2 = _this select 1;
_grpPlayer = _this select 2;

_area = list _trigger;
_area2 = list _trigger2;

scopeName "main";
while {true} do { 
   if ({_x in _area2} count units _grpPlayer > 0) then {
       {
           if ((side _x == east) && (_x in _area)) then {
               sleep 2 + random 3;
	        hintSilent "OPFOR stopped";
               _x disableAI "MOVE";
               if (((random 1) >= 0.4) && (unitPos _x == "UP")) then {
                   _x setUnitPos "Middle";
               } else {
                   _x setUnitPos "Down";
               };
           };
       } foreach allunits;
   };
   scopeName "break";
   if ({_x in _area2} count units _grpPlayer == 0) then {
       {
           if ((side _x == east) && (_x in _area)) then {
               _x enableAI "MOVE";
               _x setUnitPos "UP";
           };
       } foreach allunits;
       breakTo "main";
   };
};
hintSilent "OPFOR can move";

OPFOR AI will enter the area but only a few meters and then be stopped. They will be able to move again if the player group leaves the safe-zone area (and stopped again if they enter again).

I think thats a good way to keep enemy AI at some distance to a extraction point or something.

Edited by Wiggum

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
Sign in to follow this  

×