OFPEC Forum
Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: Wolf on 30 Aug 2002, 03:44:40
-
Ok, Is it possible using a trigger to detect when someone is withing say, 5 meters from anyone from any of the four sides?
Ex, Your waliking along, and someone, say a civilian runs up to you and when hes withing a certain distance, a trigger is activated. If my guys was standing still the whole time, there'd be no problem, but I need both to be mobile.
So is there such a command?
And what would it be.
Thank you.
-
Ok i believe there is a condition that can define this but heres nother way make a text document and paste this into it...
_Trigger = this select 0
_Man = this select 1
#loop1
_Trigger setpos [getpos _Trigger select 0,getpos _Man select 1,0]
_Trigger = true > goto "end"
~0.0001
goto "loop1"
#end
exit
; ok this should work test it out a little i might have forgot sometin.
-
use it like this put in the guys init [trig1,guy1] exec "scriptname.sqs"
-
Hey Wolf.. what you're looking for is simply this:
Condition for your trigger: unitname distance unitname < 5
then whatever you want on activation
:cheers:
-
Thank you, thats what i couldnt dig out of my head :)
-
lol
Thanks all.
I think the Knowabout command will work the best if its all the same to you.lol.
Thanks all.