Jump to content
Ice_Rhino

Detect named unit in trigger area

Recommended Posts

I want to trigger an event when one or both named units enter a trigger area. I can't use BluFor Present, has to be one or both named units

Thanks

Toni(IR)

Share this post


Link to post
Share on other sites

Try on condition:

(alive name1) || (alive name2)

or

(alive name1) or (alive name2)

It is only a suggestion. I got (!alive name1) && (!alive name2) in my mission and it works.

Cheers

Share this post


Link to post
Share on other sites

Valixx, thanks for this, I understand the syntax you have suggested but how do I link it to the trigger so that it fires when either unit moves in to the area?

I have seen talk of ARMA II referring to

unit in thislist

but I can't find the AnyBody command which ARMA II seems to use

Edited by Ice_Rhino
  • Like 1

Share this post


Link to post
Share on other sites

Thanks, I will give it a shot

---------- Post added at 19:59 ---------- Previous post was at 19:43 ----------

I am sure what you are telling me is right I just can't get it to work. To elaborate on my goal;

1. Two members of my team, having recently been freed from setcaptive. Units named blu_hostage_1 & 2

2. Move to a Trigger area of 50 x 50

3. In that trigger I have under the condition field:- (alive blu_hostage_1) or (alive blu_hostage_2)

4. Same Trigger (Grouped to me):- On ACT hint "Trigger fired"

No hint when the units get into the trigger zone

Share this post


Link to post
Share on other sites

Well i'm not sure if i'm right :P

Heres a hostage mission i've created right now for you. You can edit it in the editor.

You spawn infront of a trigger.. if you run into it, the 2 hostages are following you. You need to bring them to another place. If you run into the trigger, they will be released out of your control. Look in the editor and preview.

Edit: I think your 4th step is false. You have to sync it, not group.

Share this post


Link to post
Share on other sites

Ungroup the trigger from yourself and just leave it at default values. Place this in the condition

{[thisTrigger, _x]call BIS_fnc_inTrigger}count [blu_hostage_1, blu_hostage_2] > 2

  • Thanks 1

Share this post


Link to post
Share on other sites

How are you gonna get a greater than 2 count with only 2 units to count? :) > 1 right?

Share this post


Link to post
Share on other sites

How do I access the mission you created for me?

Well i'm not sure if i'm right :P

Heres a hostage mission i've created right now for you. You can edit it in the editor.

You spawn infront of a trigger.. if you run into it, the 2 hostages are following you. You need to bring them to another place. If you run into the trigger, they will be released out of your control. Look in the editor and preview.

Edit: I think your 4th step is false. You have to sync it, not group.

Thanks

Toni(IR)

---------- Post added at 21:46 ---------- Previous post was at 21:39 ----------

I have placed this code

{[thisTrigger, _x]call BIS_fnc_inTrigger}count [blu_hostage_1, blu_hostage_2] > 0

and it works now, great stuff, THANKS!!!!

Toni (IR)

---------- Post added at 22:01 ---------- Previous post was at 21:46 ----------

Just a point to note, if I ungroup the trigger from myself it did not work. In order for it to fire I had to change it to Switch & Anybody

Share this post


Link to post
Share on other sites

Unless you left "this" in the condition you shouldn't need switch nor anybody since you're telling it specifically what to do. But at least it's working!

Share this post


Link to post
Share on other sites
How are you gonna get a greater than 2 count with only 2 units to count? :) > 1 right?
Lol yer i originally wrote it as ==2 to detect both, then reread the OP and realising he only wanted one or the other changed to > but forgot to change the number :D but i see Ice_Rhino got that sorted > 0 for either.
Just a point to note, if I ungroup the trigger from myself it did not work. In order for it to fire I had to change it to Switch & Anybody

As kylania say aslong as only what i posted is in the condition (no 'this') then just a default trigger will do.

Share this post


Link to post
Share on other sites

Hi everybody,

i wuold like to activate a trigger went i detect somebody with my drone. I mean, if I find a soldier "X" with the AR2 Darter .

Thank for your help.

Share this post


Link to post
Share on other sites
5 hours ago, Proteus26 said:

Hi everybody,

i wuold like to activate a trigger went i detect somebody with my drone. I mean, if I find a soldier "X" with the AR2 Darter .

Thank for your help.

(darter findNearestEnemy position player) distance player > 30                                       >> into the condition trigger / by any you can change by < ou > + value the distance for the spott

(player  findNearestEnemy position player) distance player > 30   // if you play a slot with a drone

 

darter  your name object init box  you can  remplace player  by any object with his name

 

https://community.bistudio.com/wiki/findNearestEnemy

by;)) good edition and create an actually topic this date of 2013 ^^

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

×