[trigger] Portal activation

Level 7
Aug 11, 2009
I haven't found a thread about that, so I'm making one.

I don't know why is this trigger working incorrectly:
  • Goldenmist Village dies
    • Events
      • A unit - Elven Town Hall 0232 <gen> Dies
    • Conditions
    • Actions
      • Wait 3.00 seconds
      • Jednostka - Move Portal 0572 <gen> instantly to (Center of Portal2 <gen>)
      • Neutralny budynek - Set Portal 0572 <gen> destination to (Center of Gold Deposits <gen>)
      • Neutralny budynek - Turn on Portal 0572 <gen>
      • Neutralny budynek - Set Portal 0575 <gen> destination to (Center of Goldenmist Village <gen>)
      • Neutralny budynek - Turn on Portal 0575 <gen>
It should work, but the point is: moved portal doesn't teleport units. I checked the waygate, which doesn't have to be moved and it works, however the other one doesn't.

Shorter: I move portal A to region A, then connect it to region B and turn it on, also I connect portal B to region A and turn it on. Portal B works, Portal A doesn't.

Could I get a response as fast as possible? Would be very nice of you.
Ok, I got the solution:
  • Actions
    • Set Points[1] = (Center of Region 000 <gen>)
    • Set Points[2] = (Center of Region 001 <gen>)
    • Unit - Move Way Gate 0000 <gen> instantly to Points[1]
    • Unit - Remove Waygate ability from Way Gate 0000 <gen>
    • Unit - Add Waygate ability to Way Gate 0000 <gen>
    • Neutral Building - Set Way Gate 0000 <gen> destination to Points[2]
    • Neutral Building - Enable Way Gate 0000 <gen>
    • Custom script: call RemoveLocation (udg_Points[1])
    • Custom script: call RemoveLocation (udg_Points[2])
Add and remove the waygate ability and then set the new destination.