OFPEC Forum

Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: Killzone on 01 Jun 2004, 16:55:41

Title: Moving a group as one
Post by: Killzone on 01 Jun 2004, 16:55:41
Hey

Is there a way to move a group as one. What I mean is

I created a group and named the leader. then I put in the init of the leader  grp=group this

Then I created a trigger with activation west and on the activation line I put   grp domove getpos target1

target1 one is just another soldier I placed on the map.

I get this error.

grp domove getpos target1 # error domove type group expected array object

I can't figure out how to get a group to move together. Is this something that must be done in a script only?

Thanks for the help ;D
Title: Re:Moving a group as one
Post by: rhysduk on 01 Jun 2004, 16:58:24
What do you mean by:
Quote
Is there a way to move a group as one
 ???

Do you mean move the group from one place on the map to another place on the map? Or make the group of units walk to another place?

Rhys
Title: Re:Moving a group as one
Post by: Killzone on 01 Jun 2004, 17:03:57
sorry if I was not clear. I mean get them them to walk (or run)  to where target1 is.

Title: Re:Moving a group as one
Post by: rhysduk on 01 Jun 2004, 17:07:47
Right then, from past experience, moving the group, as a group, in other words wanting the whole group to move wil not work, you have to tell the leader of the group to move and the other will follow him :)

So just put the name of the leader in the doMove commadn
 
EG :-

killzone doMove getPos target1

Rhys
Title: Re:Moving a group as one
Post by: dmakatra on 01 Jun 2004, 19:05:15
Or you could do like this:

"_x commandmove getpos target1" foreach unit grp

Syntax not guaranteed. The good thing about this is that the leader will say the order in the radio thingy, so it's good if the player is in the group.

:beat: *Gets Shot* :beat:
Title: Re:Moving a group as one
Post by: macguba on 01 Jun 2004, 20:14:23
No no no this thread is all bollocksed up.     doMove is a command for an individual unit.   The equivalent command for a group is move.

The error message has it clearly.     When you get something like this you should check the comref to make sure that you really do understand the command you are trying to use and its syntax.

Hope that's cleared things up.   :)
Title: Re:Moving a group as one
Post by: rhysduk on 01 Jun 2004, 21:12:25
Oops, Macguba as spoken. All go back to my corner  :D
Title: Re:Moving a group as one
Post by: macguba on 01 Jun 2004, 23:40:35
 ;D
Title: Re:Moving a group as one
Post by: Killzone on 02 Jun 2004, 04:52:50
yep, using move instead of domove worked perfectly.


the  command "_x commandmove getpos target1" foreach unit grp  worked accept the commander would move all the way to the target before the rest of the squad would follow.

Thanks everyone for the help.  Macguba your right I should read more of the Comref (Since I have it printed out) It's just hard to not shoot myself while doing it. It is sooooooo boring.  ;) ;D