Forum Jump :

Author Message


Posts: 1589
Rank:


Level: Member

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

 
#196678 Posted at 2017-03-25 00:03        
     
You can't do it with simple trigger because you need to refresh thislist (result for units satisfying the cond) and it's impossible without deact then react the trigger.

In fact, you don't need a trigger but loops checking for each player in some area.

Place a marker, ellipse one with the color you want to signal the area, say mkr1. You can even change the area color when activated.
In each init field of playable units, or in initPlayerLocal.sqf (at mission root),
write:
0 = this spawn { // (this select 0) for initPlayerLocal.sqf
  waitUntil {sleep 0.5; isPlayer _this};
  if (local _this) then {
    while {isPlayer _this} do {
      waitUntil {sleep 0.5; _this inArea "mkr1"};
      _this allowDamage false;
      hint "ok or what you want";
      waitUntil {sleep 0.5; !(_this inArea "mkr1")};
      _this allowDamage true;
      hint "nok or else"
    }
  }
};

This post was edited by Pierre MGI (2017-03-25 21:07, ago)

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