Home   Help Search Login Register  

Author Topic: Group Move Script v2 by SelectThis  (Read 540 times)

0 Members and 1 Guest are viewing this topic.

calvinjune

  • Guest
Group Move Script v2 by SelectThis
« on: 31 Aug 2004, 00:27:35 »
i'm using the following script by SelectThis to move multiple groups.

--------------------------
;//Parameters to pass
;// _Group is the group you want to move

_Group = _this select 0
_GroupLeader = Leader _Group


;//check to see if _group has any alive members
?count units _Group == "!alive _x" count units _Group:  goto "Alldead"

;//radio msg for when script starts

_GroupLeader SideChat "Send coordinates, over"

; wait until the player has set a user marker
userMarkerSet = false
@userMarkerSet

;move each of the units in _Group
;"_x DoMove userMarkerPos" ForEach (units _Group)
units _Group Commandmove userMarkerPos
;confirm the move order
_GroupLeader SideChat "Roger, moving out"
exit

#Alldead
Hint "This Group has been elminated"
exit
-----------------------------------------

however, when the group leader dies, the script reports that the entire group is dead.
i used [a1] exec "move.sqs" to call the script. is this incorrect? can you suggest a better script for moving groups?

Offline Planck

  • Honoured
  • Former Staff
  • ****
  • I'm never wrong ....I'm just not always right !
Re:Group Move Script v2 by SelectThis
« Reply #1 on: 31 Aug 2004, 01:01:26 »
Who is called a1?

Is this the name of the group leader?

The name you need to pass to the script is the name of the group.

If a1 is the name of your group, then I have no clue yet why it isn't working.


Planck
I know a little about a lot, and a lot about a little.

calvinjune

  • Guest
Re:Group Move Script v2 by SelectThis
« Reply #2 on: 31 Aug 2004, 02:55:03 »
a1 is ther name of the group leader.

calvinjune

  • Guest
Re:Group Move Script v2 by SelectThis
« Reply #3 on: 31 Aug 2004, 03:03:51 »
actually, sorry, nevermind. i had a typo in one of my init fields. script works fine now.