Moving Players Units

Rab

New Member
Reaction score
1
How would i move each players units to a specific different place each after a timer expires?
All the players units are in the same region
For example,after the timer expires,reds units go to Place 1 blues units go to place 2 and teals units go to place 3 and so on...
i tried using this but it doesnt work..
Timer_To_Start is basically a timer which expires in 180 seconds,Red Play <gen> is the place that red's units are supposed to teleport to.
Code:
First Warp
    Events
        Time - Timer_To_Start expires
    Conditions
    Actions
        Player Group - Pick every player in Player Group - Player 1 (Red) and do (Unit - Move (Triggering unit) instantly to (Center of Red Play <gen>))
        Player Group - Pick every player in Player Group - Player 2 (Blue) and do (Unit - Move (Triggering unit) instantly to (Center of Blue Play <gen>))
        Player Group - Pick every player in Player Group - Player 3 (Teal) and do (Unit - Move (Triggering unit) instantly to (Center of Teal Play <gen>))
        Player Group - Pick every player in Player Group - Player 4 (Purple) and do (Unit - Move (Triggering unit) instantly to (Center of Purple Play <gen>))
        Player Group - Pick every player in Player Group - Player 5 (Yellow) and do (Unit - Move (Triggering unit) instantly to (Center of Yellow Play <gen>))
        Player Group - Pick every player in Player Group - Player 6 (Orange) and do (Unit - Move (Triggering unit) instantly to (Center of Orange Play <gen>))
        Player Group - Pick every player in Player Group - Player 7 (Green) and do (Unit - Move (Triggering unit) instantly to (Center of Green Play <gen>))
        Player Group - Pick every player in Player Group - Player 8 (Pink) and do (Unit - Move (Triggering unit) instantly to (Center of Pink Play <gen>))
Thanks :thup:
 

Heresme

Member
Reaction score
4
I think what you're looking for is, uh...

Action
Unit Group - Pick every unit in (Units owned by Player 1 (Red)) and do (Unit - Move (Triggering unit_ instantly to (Center of Red Play <gen>))

I think Unit Group is probably what you want.

If you don't want to move every unit owned by the player, you could use variables to set one of the unit you want to move as a Unit Group variable, and then have it move the variable Unit Group.

If you're familiar with variables... I'm not explaining it well.
 

Rab

New Member
Reaction score
1
I think what you're looking for is, uh...

Action
Unit Group - Pick every unit in (Units owned by Player 1 (Red)) and do (Unit - Move (Triggering unit_ instantly to (Center of Red Play <gen>))

I think Unit Group is probably what you want.

If you don't want to move every unit owned by the player, you could use variables to set one of the unit you want to move as a Unit Group variable, and then have it move the variable Unit Group.

If you're familiar with variables... I'm not explaining it well.
i tested this out but it didnt work..moving every unit or a single unit doesnt matter for me just have to get the hero to Red Play <gen>
i cant teleport a unit group to a region either..
 

Ryushi

"I will stand, or I will fall. I will not sit."
Reaction score
59
The line isn't working because there is no triggering unit. You would need to change this line to this:

Unit Group - Pick every unit in (Units owned by Player 1 (Red)) and do (Unit - Move (Picked Unit instantly to (Center of Red Play <gen>))
 

Smitty

Member
Reaction score
20
This would be better;

Set TempGroup = units belonging to player 1 (red)
Pick every unit in TempGroup and move picked unit instantly to centre of Red Play
call DestroyGroup(udg_TempGroup)

Actually this raises a question I've been meaning to ask for a while regarding unit groups;

Anyone know whether using (unit group- remove all units of TempGroup from TempGroup) works as well as DestroyGroup?
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top