Jump to content
Sign in to follow this  
mrcash2009

Spotter to detect certain group names only

Recommended Posts

I have 2 spotters generated randomly on a map, they are simply there to set a variable true if they spot bluefor. Then a trigger runs if both 2 variables = true (each spotter has a variable each).

I dont want the spotters to use general "bluefor" detect becuase thats any bluefore on the map. I only want them each to enable a variable if they spot/detect certain bluefore groupname(s).

So how do I/whats the syntax for the condition for group names? (Or scripts to run.)

Im slowly getting up to speed and all groups are named (I have 3 SF teams Alpha, bravo, delta) im just not sure specific line to add to trigger condition for all three groups.

Something like:

Quote[/b] ]

_this (group names) detected

(I have no clue what "detected" would be code wise or how to list the group names).

Anyone? Thanks in advance if you can plant the seed or add a pointer.

Share this post


Link to post
Share on other sites

Perhaps a BLUFOR Detected By REDFOR trigger?

The condition could be:

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">

this && grp1 in thisList && grp2 in thisList

To name your groups, this would go into their init:

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">

grp1 = group this;

Haven't tested this, but it could be a start.

Share this post


Link to post
Share on other sites

For help to other i just thought id post here that this was resolved with help from Mandoble with a very nice global script for setting up spotters / only looking for certain named groups and reporting this via a variable to use in a trigger situation ..

Heres the thread :

http://www.ofpec.com/forum/index.php?topic=32229.0

A demo mission with fully working script is at the bottom of the posts from Mandoble thumbs-up.gif

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  

×