• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!

Group Unit teleport Region?

Status
Not open for further replies.
Level 2
Joined
Feb 24, 2012
Messages
8
Hi guys, does anyone know how to make a trigger that moves all the units from on region to another?

For example----

Start Teleportation
Events
Player - Player 1 (Red) types a chat message containing -start as An exact match
Conditions
Actions
Unit Group - Pick every unit in (Units in Player 1 Red <gen>) and do (Unit - Move (Matching unit) instantly to (Center of Light Side <gen>))
Unit Group - Pick every unit in (Units in Region 002 <gen>) and do (Unit - Move (Matching unit) instantly to (Center of Dark Side <gen>))
Trigger - Turn off (This trigger)


But nothing happens..
What am I doing wrong?
 
Level 20
Joined
Feb 23, 2014
Messages
1,264
It should work with (Picked unit) - just tested it, so either:

a) You're not sending the right chat command.
b) You messed up the regions and the ones you're moving the units from don't have any units.
c) Your move action doesn't look like this:

  • Unit Group - Pick every unit in (Units in Player 1 Red <gen>) and do (Unit - Move (Picked unit) instantly to (Center of Light Side <gen>))
 
Level 39
Joined
Feb 27, 2007
Messages
5,024
Be aware that this leaks a location for every unit (Things That Leak). You will need to properly clean it up:
  • Set TempPoint = (Center of Light Side <gen>)
  • Unit Group - Pick every unit in (Units in Player 1 Red <gen>) and do (Unit - Move (Picked unit) instantly to TempPoint)
  • Custom script: call RemoveLocation(udg_TempPoint)
 
Status
Not open for further replies.
Top