OFPEC Forum

Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: gadolinite on 21 May 2004, 01:15:24

Title: any unit in a group knowsabout any unit in another group
Post by: gadolinite on 21 May 2004, 01:15:24
What is the syntax for this situation?  (any unit in group1) KnowsAbout (any unit in group2) > 0
Title: Re:any unit in a group knowsabout any unit in another group
Post by: j-man on 21 May 2004, 01:33:07
Toadlife made a funxtion called "threat matrix". You might want to go to the editor's depot and check it out.
Title: Re:any unit in a group knowsabout any unit in another group
Post by: Chris Death on 21 May 2004, 02:08:26
If it's only for any unit in one group about any unit from another
group, you don't need the function;

The leader of group A shares knowledge with his men about
anybody in group B.

in a trigger's condition field:

Code: [Select]
"leader groupA knowsabout _x > 0" count units groupB > 0

or in a script:

Code: [Select]
?"leader groupA knowsabout _x > 0" count units groupB > 0
:note - the function comes in handy if you want to know if
anybody from one array knowsabout anybody from another array.

~S~ CD