Home   Help Search Login Register  

Author Topic: Trigger activated when you get so close to someone  (Read 1353 times)

0 Members and 1 Guest are viewing this topic.

Wolf

  • Guest
Trigger activated when you get so close to someone
« 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.

ofp..hahha

  • Guest
Re:Trigger activated when you get so close to someone
« Reply #1 on: 30 Aug 2002, 04:40:27 »
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.

ofp..hahha

  • Guest
Re:Trigger activated when you get so close to someone
« Reply #2 on: 30 Aug 2002, 05:27:33 »
use it like this put in the guys init [trig1,guy1] exec "scriptname.sqs"

Kaliyuga

  • Guest
Re:Trigger activated when you get so close to someone
« Reply #3 on: 30 Aug 2002, 05:33:52 »
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:

ofp..hahha

  • Guest
Re:Trigger activated when you get so close to someone
« Reply #4 on: 30 Aug 2002, 05:35:36 »
Thank you, thats what i couldnt dig out of my head :)

Wolf

  • Guest
Re:Trigger activated when you get so close to someone
« Reply #5 on: 30 Aug 2002, 05:41:30 »
lol
Thanks all.
I think the Knowabout command will work the best if its all the same to you.lol.
Thanks all.