OFPEC Forum
Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: Kilo11 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=-
-
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.
-
And if the leader dies? And how to I define a group?
-=Hoot=-
-
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