• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

Moving regions causes bugs

Status
Not open for further replies.
Level 1
Joined
Jun 7, 2008
Messages
6
I've been trying to move the waypoints for spawns you might see in a standard TD to the locations of units that the player builds using two simple triggers

  • Events
    • Unit - A unit enters (Playable map area)
  • Conditions
    • (Unit-type of (Triggering unit)) Equal to Relay Point 1 (Incorporeal)
  • Actions
    • Region - Center 1 <gen> on (Position of (Triggering unit))
  • Events
    • Unit - A unit enters 1 <gen>
  • Conditions
    • (Owner of (Triggering unit)) Equal to Player 2 (Blue)
  • Actions
    • Unit - Order (Entering unit) to Move To (Center of 2 <gen>)
But there seems to be something fundamentally wrong with using triggers like this because the unit always get stuck. They work fine unless the region is moved by the first trigger, then they will go to the region but stop. Not only that but almost all the triggers that rely on the moved region stop working.

I've tried circumventing the problem by replacing the spawn with a trigger that always sends the 2nd unit to the next region instead but that doesn't work either. The only solution that has partially worked so far is the trigger
  • Events
    • Unit - A unit owned by Player 2 (Blue) Is issued an order with no target
  • Conditions
    • (1 <gen> contains (Triggering unit)) Equal to True
  • Actions
    • Unit - Order (Triggering unit) to Move To (Center of 2 <gen>)
This moves all the units except the first one properly, the first one still stays stuck. I don't know how to do scripting and I've tried so many different ways of doing the trigger that I know it's some larger problem.
 
Level 2
Joined
Feb 21, 2008
Messages
18
I had also problems with moving regions. I never found out why it don´t worked. Finally a made a new trigger that gave the same command but which don´t used "moving region"
 
Level 5
Joined
Sep 8, 2004
Messages
98
Try using a ~0.10 sec periodic event that creates a region centered on your unit.

Set a group to the units inside the region owned by blue

Order all the units in the group to move to region 2.

And don't forget to destroy the region. :p
 
Level 24
Joined
May 9, 2007
Messages
3,563
The third trigger is pointless. A skill with no target is something like Warstomp or Stop.

  • Move
    • Events
      • Unit - A unit enters (Region 1)
    • Conditions
      • (Owner of (Triggering unit)) Equal to Player 2 (Blue)
    • Actions
      • Set TempPoint = (Center of (Region 2))
      • Unit - Order (Triggering unit) to Move To TempPoint
      • Custom script: call RemoveLocation(udg_TempPoint)
Perhaps since the regoin is coming to them it does not count as entering.

There is no reason that this should not work.
 
Level 5
Joined
Jan 15, 2007
Messages
199
I think hawk is right about the region coming to them not working, because the event activates when they enter it, which would probably be checked in the unit movement coding of Warcraft III. The region appearing on them is not counted as the unit moving into the region (afaik).
 
Status
Not open for further replies.
Top