Forum Jump :

Author Message


Posts: 4
Rank:


Level: Member

Country: us
Location:
Occupation:
Age:
In-game name:

 
#1 Posted at 2016-03-01 02:57        
     
Hi! So my scenario goes a little like this:

BLUFOR attacks a base, and upon engaging it a global hint and alarm is sent out to all players on the server to notify it is being attacked. If BLUFOR manages to secure the base another global hint/audio and map marker is sent out again to notify others of the base capture. This is particularly useful to anybody playing OPFOR that is just generally trying to make BLUFOR's job a little harder by adding a human element, allowing them to know when/where BLUFOR is attacking without guessing their targets.

The "alarm" is attached (ownership) to a single OPFOR unit, and when that unit is dead (not present, !alive, take your pick) then the global audio and hint is kicked out. What I would now like to do is attach that trigger to multiple units and have it repeat. For example, BLUFOR attacks and the unit is killed, sending out an alarm, and BLUFOR has to fall back and disengage. At that point, since the unit is killed, the alarm trigger obviously won't work again, leaving OPFOR in the dark is the base were to be attacked again.

My idea is that I attach the trigger to multiple units, and put a 10 minute timer in between activation. So, unit1 is killed and an alarm is sent, and the trigger wont repeat for ten minutes. After ten minutes, if unit2 is killed the alarm goes off again, keeping OPFOR up to date. My problem is just that, I can't figure a condition that will allow me to do this. It will go off if unit1 is killed, but won't repeat if unit2 or unit3 is (I'll implement the timer after I get the repeating trigger to work...). My condition code looks like this:

!alive t1 or !alive t2 or !alive t3

If I understand correctly, or will identify if individual units are !alive, and && identifies if all units are !alive. How can I make it repeat based on individual units? I'm probably dragging this out by this point lol. Picture for reference: IMAGE

Thanks in advance!


Author Message


Posts: 612
Rank:


Level: Member

Country: au
Location: Perth
Occupation: Arma Addict
Age: 20
In-game name: BroBeans

 
#2 Posted at 2016-03-01 05:48        
     
Why don't you just say its owned by opfor and on blufor detection it sounds the alarm? instead of linking it to individual units?


Advertisement


Author Message


Posts: 1589
Rank:


Level: Member

Country: pf
Location: Tahiti
Occupation: too many Arma
Age: 57
In-game name: Kobayashi Maru

 
#3 Posted at 2016-03-01 06:38        
     
First, your trigger must detect the BLUFOR.
Your capture_camp_8 must have activation none, BLUFOR, detected by OPFOR, repeatable
In on act, your alarm seems OK.
but add on deact: "" remoteExec ["hint"]
to disable the alarm.

In a script (init.sqf), or an unconditional trigger (remove "this" in cond field, none none, not repeatable),

0 = [] spawn {
  _my_nights_watch = [t1,t2,t3];
  while {true} do {
    waitUntil { {alive _x} count _my_nights_watch  != count _my_nights_watch};
    capture_camp_8 setTriggerActivation ["NONE", "NONE", true];
    sleep 600;
    _my_nights_watch = _my_nights_watch select {alive _x};
    if (count _my_nights_watch >0) then {
      capture_camp_8 setTriggerActivation ["WEST", "EAST D", true]};
   sleep 1;
  };
};

You can try also time out or count down in the detection trigger instead of sleep 600.

PLEASE CONTACT ME ON BI FORUMS FOR ANY SCRIPT / MOD QUESTION. TKS

Author Message


Posts: 4
Rank:


Level: Member

Country: us
Location:
Occupation:
Age:
In-game name:

 
#4 Posted at 2016-03-01 18:10        
     
# BroBeans : Why don't you just say its owned by opfor and on blufor detection it sounds the alarm? instead of linking it to individual units?
Wouldn't this only work if blufor was inside the area of the trigger? I could be wrong. The reason for not wanting to do it like that is because several outposts are built to be taken by long range combat, and I don't want triggers spanning 900+ meters. I could be wrong though, and if this detects opfor being killed then that makes my life a heck of a lot easier.

# Pierre MGI : First, your trigger must detect the BLUFOR.
Your capture_camp_8 must have activation none, BLUFOR, detected by OPFOR, repeatable
In on act, your alarm seems OK.
but add on deact: "" remoteExec ["hint"]
to disable the alarm.

In a script (init.sqf), or an unconditional trigger (remove "this" in cond field, none none, not repeatable),

0 = [] spawn {
  _my_nights_watch = [t1,t2,t3];
  while {true} do {
    waitUntil { {alive _x} count _my_nights_watch  != count _my_nights_watch};
    capture_camp_8 setTriggerActivation ["NONE", "NONE", true];
    sleep 600;
    _my_nights_watch = _my_nights_watch select {alive _x};
    if (count _my_nights_watch >0) then {
      capture_camp_8 setTriggerActivation ["WEST", "EAST D", true]};
   sleep 1;
  };
};

You can try also time out or count down in the detection trigger instead of sleep 600.

Awesome, thank you! I'll be back after I've messed with this to report my findings!