OFPEC Forum

Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: Butler on 07 May 2005, 14:42:23

Title: Knowsabout any group member
Post by: Butler on 07 May 2005, 14:42:23
Hi guys!

I want a script to activate when any member of a group is detected by a soldier, I dont want to use a "detected by east/west trigger with a radius"  Is this possible?

Like:  "ammodriver knowsAbout _x">0.105 foreach units mygrp" I know this is wrong, but i wrote this so you could get an idea of what i am looking for.

By the way. You guys are great. I love this site  ;D
Title: Re:Knowsabout any group member
Post by: macguba on 07 May 2005, 15:02:55
You're almost right.    Try something like

(("ammodriver knowsAbout _x" > 0.105) count units mygrp) > 0

Syntax not guaranteed.
Title: Re:Knowsabout any group member
Post by: Butler on 07 May 2005, 16:00:42
Thank you macguba, but when i use this in the condition field of the trigger, I get this error message ">: Type string, expected number"

Maybe I am doing something wrong here, but I want this trigger to activate if the driver of a car (ammodriver) knowsabout me, or any of my team members. I tried to use the line you wrote, but that didnÂ't work.

Thanks anyway for quick reply  :)
Title: Re:Knowsabout any group member
Post by: THobson on 07 May 2005, 17:48:41
I have not tested it but try:

{(ammodriver knowsAbout _x) > 0.105} count (units mygrp) > 0
Title: Re:Knowsabout any group member
Post by: Butler on 07 May 2005, 18:12:28
That worked!

Thanks to the both of you. I am very happy now!! ;D