OFPEC Forum
Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: 456820 on 26 Sep 2005, 21:25:59
-
if you set up a trigger east detected by west and run a script through it is there away of finding out who detcted the east units ? if so how
thanks
-
I don't think there is a way via triggers only. You could execute a script that runs through all units on the opposing side and detect if they know about the east unit though.
TRIGGER:Activ: Any Group Member
Detected By West
onActiv: [list westUnitsTrigger] exec "findUnit.sqs"
and just run a script checking for each member of a "West" or "East" array if they detected the man.
-
actually i believe you could find out who saw them with 2 triggers:
nvm, 2 triggers and a script...
trigger 1:
west detected by east
on activation:found=true;found_units=thislist; and anything else you want
trigger 2:
covering whole map
east present (probably repeatedly, depends on the situation)
condition:this and found
on activation: thislist exec "whoknows.sqs"
_found = found_units
_east_units = this
_finders = []
{?_x knowsabout ({_x} foreach _found) > 2:_finders = _finders + _x} foreach _east_units
hint format ["%1 have found the west units",_finders]
i believe 2 is the correct knowsabout value (more or less) for whether a unit has been identified. this isn't garunteed, especially since that coupling of foreach might be a bit touchy....
-
mm, heard 1.1 or 1.5.
But i'll go check. :P
-
Eh, I was wrong. :o
With Resistance (1.91):
No matter what class of unit the target is and no matter what the skill/class of the enemy AI, the magic 'knowsabout' number is 0.105.
-
well i was way off :P ::) :-\
oh well...
-
thanks alot ive found a way wich i oulled out of some other script its a bit slow but it works
thanks
topic solved