Jump to content
Sign in to follow this  
CarlGustaffa

Detected by Trigger, return detected unit

Recommended Posts

Hi

How can I obtain the unit that set off a "Detected by Trigger"? It shouldn't have to be player, but any of my sides unit, or a specific type of unit.

I want to send a patrol to the position the unit causing the trigger to go off was last spotted.

Is this doable?

Share this post


Link to post
Share on other sites
Hi

How can I obtain the unit that set off a "Detected by Trigger"? It shouldn't have to be player, but any of my sides unit, or a specific type of unit.

I want to send a patrol to the position the unit causing the trigger to go off was last spotted.

Is this doable?

detect nearest enemy and get there position.

only the AI that has been reported will be detected.

Share this post


Link to post
Share on other sites
Hi

How can I obtain the unit that set off a "Detected by Trigger"? It shouldn't have to be player, but any of my sides unit, or a specific type of unit.

I want to send a patrol to the position the unit causing the trigger to go off was last spotted.

Is this doable?

Hello people.I want to do exactly the same thing but all advice ive read has been to no avail.Please could someone explain to me in simple laymans terms as how to send a unit to attack another unit activating a detected by trigger.Ive heard i might need a script as the standard trigger dosent seem to work execpt for end game and other affects.

Share this post


Link to post
Share on other sites

what about.

You make the trigger. activeted by, the side you want.

then condition you put, !player

and on act you put a script. "nil = thislist execvm "yourscript.sqf"

or {player sidechat format["%1 activated trigger",_x]} foreach thislist

http://community.bistudio.com/wiki/list

Share this post


Link to post
Share on other sites

Works nicely. I notice I can ask for "select 1", but I'm not getting anything useful from it. Anyone knows what this is in such a trigger?

I was hoping to obtain the unit that detected as well, but it seems to be something else.

Share this post


Link to post
Share on other sites

If you name the trigger you can call the trigger array in a script, check the side and select them.

Share this post


Link to post
Share on other sites

CarlGustaffa, try using :

thislist select 0

, since only one unit is likely to be initially detected.

In a "A detected by B" trigger, thislist is a list of units on side A, that are within the trigger area and are sufficiently knownAbout by side B such that their side is known.

Share this post


Link to post
Share on other sites

So, in order to find out which guardstation is to react on the trigger, I have to use a secondary trigger that lists all?

Then in a script compare all side A units of list A who has the greatest knowsabout of the select 0 unit in trigger B?

Hmm.. Sounds abit too much for my skills, or lack thereof smile_o.gif

Thanks anyway, always great to learn something new.

Share this post


Link to post
Share on other sites

I'd just compare the detected unit's position to position of the guards/patrols. Whichever is closest can get sent to investigate first.

Share this post


Link to post
Share on other sites

Ehhm, how?

Yes, I'm again trying to work with this.

_target = _this select 0; (the detected unit)

{player sidechat format["%1 is possible unit that detected enemy.",_x]} foreach list tEastAriFriendlies;

How do I find in this list the unit which is closest to _target?

My coding skills are not that great, to say the least.

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
Sign in to follow this  

×