Home   Help Search Login Register  

Author Topic: Commanding a group to move?  (Read 564 times)

0 Members and 1 Guest are viewing this topic.

Bad Maniac

  • Guest
Commanding a group to move?
« on: 27 Apr 2003, 00:27:57 »
This game is so stupid  >:(...

in the init line of a group leader I type:
this CommandMove object2
and only the leader goes off, the other units in the group just sits around doing nothing.

I tried
groupname CommandFollow leader groupname but it says "error expecting unit or array"
so I did
[T1,T2,T3,T4] CommandFollow leader groupname
and the error goes away, but still only the leader moves, all the other units just stays put.

I need a hand here, how can I make the whole group move?

The_Milky_Bar_Kid

  • Guest
Re:Commanding a group to move?
« Reply #1 on: 27 Apr 2003, 00:47:11 »
Whats wrong with waypoints?

If that is a problem try this:

"_x commandMove object2" forEach units group this

in the init field of the officer.
« Last Edit: 27 Apr 2003, 00:48:14 by The_Milky_Bar_Kid »

Bad Maniac

  • Guest
Re:Commanding a group to move?
« Reply #2 on: 27 Apr 2003, 02:05:29 »
(_x commandFollow leader T1) forEach units group T1;
Error Local Variable in Global Space.
 ???

help, what's wrong with the above code?
The thing is, I have a script that makes the leader follow another unit NOT in the same group. I just need the other units in the same group as T1 to follow T1.

Offline Burn

  • Members
  • *
Re:Commanding a group to move?
« Reply #3 on: 27 Apr 2003, 02:38:59 »
Tgrp = group this;"_x commandMove object2" foreach units Tgrp
Type that in the groupleaders init. field...
... hope it helps... :P

Offline Sui

  • Former Staff
  • ****
    • OFPEC
Re:Commanding a group to move?
« Reply #4 on: 27 Apr 2003, 02:53:17 »
Use your orginal line, but replace commandmove with move. eg.

this Move object2

Also, shouldn't there be a getpos in there somewhere? eg.

this Move getpos object2

Anyway, the differences between the move command:
  • Move: Effectively gives the unit (or group) a new move waypoint at the position specified.
  • Commandmove: The same as the units leader ordering the unit to move to a postion. Hence, only one unit will follow the order, not the whole group
  • Domove: The silent version of commandmove (ie. no "6 move to 23 4" order is given)
Also, I'm not too sure you can put orders like that in an init line...
If those suggestions still don't work, try giving the unit a waypoint and putting the line in it's OnAct field ;)

Bad Maniac

  • Guest
Re:Commanding a group to move?
« Reply #5 on: 27 Apr 2003, 12:49:50 »
I'm putting the orders in a script, and Move isn't in the command ref...
funny thing is, move works when I put it in the init field to try it, but it does nothing at all when I put move in my script... I'm going insane, I just want a group to follow a unit, from another group, can someone give me a hand with the script?
« Last Edit: 27 Apr 2003, 12:51:20 by Bad Maniac »

Offline DrStrangelove

  • Members
  • *
  • Mr.Creative
Re:Commanding a group to move?
« Reply #6 on: 27 Apr 2003, 14:18:29 »
just attach your script to your next post, ppl will DL & analyse it (if you're lucky)  :D

Bad Maniac

  • Guest
Re:Commanding a group to move?
« Reply #7 on: 27 Apr 2003, 14:26:49 »

;Unit Follow Script

_obj1 = _this select 0
_obj2 = _this select 1

#Start
_obj1 Move GetPos _obj2;
~1
? (alive _obj1) : goto "Start"
exit

Never mind the bollocks. I solved the problem after LOTS![/u] of experimenting  :D

the above script works , only Move MUST be move

I don't know why, but the move command is case sensitive when you place it in a script... weird no?
« Last Edit: 27 Apr 2003, 15:33:03 by Bad Maniac »