shanawa 10 Posted September 21, 2009 I didn't see any event handlers that would help me on this one. I can make a seperate trigger for each player and report that the player was detected but I'm not sure how to have 1 trigger report which ai detected which player. Currently I have a trigger for each player BLUFOR/DETECTED by OPFOR/ ONCE: Condition: p1 in thislist Activation: hint"Player 1 has been detected."; Share this post Link to post Share on other sites
Inkompetent 0 Posted September 22, 2009 I think that the magical knowsAbout value to ID a unit is 0.105, so once a detected-trigger has fired you should be able to check what unit(s) has a knowsAbout value of 0.105 or higher for the detected unit. Share this post Link to post Share on other sites
shanawa 10 Posted September 22, 2009 Thanks. Wouldn't I have to name each unit and run a separate check for each unit? I don't know of a way to ask logically if any units knowsabout then report name of said unit. The biki on knowsabout says Number = unit knowsAbout target . So I would then have to name each unit and run a check on them individually. On activation: kv1 = e1 knowsabout p1; kv2 = e2 knowsabout p1; if (kv1>0) then {hint"e1 knows about p1";}; if (kv2>0) then {hint"e2 knows about p1";}; This works on a simple utes test with 2 soldiers. But I was looking for an easier way like how the killed event handler reports unit killed and the killer, I was hoping something would report the detector and the detected. Share this post Link to post Share on other sites
shuko 59 Posted September 22, 2009 I'd probably do it with: countEnemy Share this post Link to post Share on other sites
AgentD 10 Posted September 22, 2009 (edited) _target = _this select 0; _detectors = _this select 1; _hasDetected = []; { if (!(_x side = _target side)) and ((_x knowsAbout _target) > 0.105) then { [_hasDetected, _x] call BIS_fnc_arrayPush; }; } forEach _detectors; _hasDetected; UnitsThatHaveDetectedPlayer = [player, allUnits] ExecVM "Detected.sqf"; UnitsThatHaveDetectedPlayer = [player, list TRIGGERNAME] ExecVM "Detected.sqf"; Edited September 23, 2009 by AgentD Share this post Link to post Share on other sites