Home   Help Search Login Register  

Author Topic: Group Detection  (Read 481 times)

0 Members and 1 Guest are viewing this topic.

Kilo11

  • Guest
Group Detection
« on: 20 May 2004, 03:33:31 »
Alright, I am making a script for my mission which basically intails when your squad is detected by the east, several units will head directly to your position IGNORING their current waypoints.  I want them to getPos of the actual group, not just one man in it (in case the target dies, I need them to track the squad).

I forget how to properly use the "group" command which would identify the friendly squad.  So I need that as well as how exactly to track them.  So far i have:

groupOne move getPos player

Instead of player, I want the specific friendly group, and "groupOne" would be replaced with the enemy groups (i.e-alpha, bravo, charlie,delta, etc)

Any help is greatly appreciated!

-=Hoot=-

Offline General Barron

  • Former Staff
  • ****
  • Semper Fi!
Re:Group Detection
« Reply #1 on: 20 May 2004, 04:12:56 »
You cannot get the position of a group, since a group consists of individuals who are all in different locations. However, you CAN get the position of the LEADER of a group, whom in most cases (with AI groups) is right next to all the other group members:

enemyGroup move getpos leader friendlyGroup

Another example:

enemyGroup move getpos leader player

Would find the position of the leader of the player.
HANDSIGNALS COMMAND SYSTEM-- A realistic squad-control modification for OFP
kexp.org-- The best radio station in the world, right here at home! Listen to John Richards!

Kilo11

  • Guest
Re:Group Detection
« Reply #2 on: 20 May 2004, 20:15:23 »
And if the leader dies? And how to I define a group?


-=Hoot=-

PsyWarrior

  • Guest
Re:Group Detection
« Reply #3 on: 20 May 2004, 20:33:07 »
Greetings,

To define a group:

groupAlphaBlack = group this
(placed in the Init field of a Alpha Black group soldier)

-or-

groupAlphaBlack = group unitName
(where unitName is the name of the soldier)

-or-

You could look up the group command in the comRef, which will give you the syntax. :P

and the command
getpos leader friendlyGroup
would get the position of the leader of the group, whoever he is. If the leader is KIA, it will get the position of the new group leader (groups always have a leader, until all members of the group are killed).

-Supreme Commander PsyWarrior
-Psychic Productions Studios