• 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.

[trigger] Portal activation

Status
Not open for further replies.
Level 7
Joined
Aug 11, 2009
Messages
194
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.
 
Status
Not open for further replies.
Top