[Trigger] Region wont move!?

Status
Not open for further replies.
Level 4
Joined
Oct 15, 2008
Messages
83
  • Region 1
    • Events
      • Unit - A unit leaves Player 1 <gen>
    • Conditions
      • (Triggering unit) Equal to Player_Hero1
    • Actions
      • Unit - Make Player_Hero1 Vulnerable
      • Region - Center Player 1 <gen> on (Position of Player_Hero1)
      • Unit Group - Order (Random 1 units from Blind_Beasts) to Neutral - Kaboom! Player_Hero1
      • Wait 2.00 seconds
      • Unit - Make Player_Hero1 Invulnerable
      • Region - Center Player 1 <gen> on (Position of Player_Hero1)
Im trying to make a simple trigger that every time a unit moves from a small region they become valnureable for 2 seconds. When they are vulnerable 1 random unit from a unit group will start to walk closer to him and explode when he is close enough. After 2 seconds the region will move to the hero again to repeat the steps.

So basicly if the hero moves he will get attacked.

The problem is that the region wont move to the hero.

This should be simple but i cant figure out why its not moving.
 
Level 37
Joined
Mar 6, 2006
Messages
9,240
Add this as the last line of the trigger:
  • Unit - Create 1 Footman for Player 1 (Red) at (Center of Region) facing (Position of (Triggering unit))
You'll see that the region does move.

It's the event that makes it bug. When the code is compiled, it will take the region's original coordinates and use them for the event. It won't update the coordinates even if the region is moved to another location.

You need some other way of checking the hero's position. You can create a dummy unit and move it around. Check the distance between the dummy and the hero periodically.

Be aware of leaks.
 
Status
Not open for further replies.
Top