Way Gate Triggers

vonDarkmoor

New Member
Reaction score
9
I have the following trigger:

Trigger:
  • Waygate
    • Events
      • Map initialization
    • Conditions
    • Actions
      • Unit - Create 1 Way Gate for Neutral Passive at (Random point in (Playable map area)) facing Default building facing degrees
      • Set Way_Gate[1] = (Last created unit)
      • Unit - Create 1 Way Gate for Neutral Passive at (Random point in (Playable map area)) facing Default building facing degrees
      • Set Way_Gate[2] = (Last created unit)
      • Neutral Building - Enable Way_Gate[1]
      • Neutral Building - Enable Way_Gate[2]
      • Neutral Building - Set Way_Gate[1] destination to (Position of Way_Gate[2])
      • Neutral Building - Set Way_Gate[2] destination to (Position of Way_Gate[1])


How come when my unit attempts to enter the way gate he runs to the next way gate instead of being teleported?

also, the trigger command is -Enable way gate, however when you pre-place a way gate and open up its options it has the check box "Way Gate Activate" and forces you to choose a region. You cant choose that option unless you have declared regions on your map. How can i create a Way Gate and Activate it through triggers?
 

Sgqvur

FullOfUltimateTruthsAndEt ernalPrinciples, i.e shi
Reaction score
62
Guess way gates still require regions for destinations. You have to use custom script/jass to create regions in the random locations of your way gates.
 

vonDarkmoor

New Member
Reaction score
9
What would the custom script be if i wanted to create a region for Position of unit_variable[1] and unit_variable[2] and how would i reference those regions in GUI?
 

neckcuttabob

Member
Reaction score
3
Periodically (like 5 -10 seconds) if a unit is close to the way gate it teleports them to the corresponding gate and places them in a unit group for 15 seconds. When in that unit group they are immune to the teleport so you have x amount of seconds to get away from the gate.

If you're using only 1 unit per person then you may want to give them a spell that targets the way gate and pulls them to the corresponding gate that way.
 

Sgqvur

FullOfUltimateTruthsAndEt ernalPrinciples, i.e shi
Reaction score
62
udg_Way_Gate_Pos is an array of Regions

Uploading a map for convenience.

Trigger:
  • Untitled Trigger 001
    • Events
      • Map initialization
    • Conditions
    • Actions
      • -------- First Way Gate --------
      • Unit - Create 1 Way Gate for Neutral Passive at (Random point in (Playable map area)) facing Default building facing degrees
      • Set Way_Gate[1] = (Last created unit)
      • Neutral Building - Enable Way_Gate[1]
      • Custom script: set udg_Way_Gate_Pos[1] = Rect(0, 512, 0, 512)
      • -------- Second Way Gate --------
      • Unit - Create 1 Way Gate for Neutral Passive at (Random point in (Playable map area)) facing Default building facing degrees
      • Set Way_Gate[2] = (Last created unit)
      • Neutral Building - Enable Way_Gate[2]
      • Custom script: set udg_Way_Gate_Pos[2] = Rect(0, 512, 0, 512)
      • -------- Move udg_Way_Gate_Pos Regions to their place --------
      • Region - Center Way_Gate_Pos[1] on (Position of Way_Gate[1])
      • Region - Center Way_Gate_Pos[2] on (Position of Way_Gate[2])
      • -------- Set each Way Gate's Destination --------
      • Neutral Building - Set Way_Gate[1] destination to (Center of Way_Gate_Pos[2])
      • Neutral Building - Set Way_Gate[2] destination to (Center of Way_Gate_Pos[1])
      • -------- Change Way Gates Color : ) --------
      • Unit - Change color of Way_Gate[1] to Red
      • Unit - Change color of Way_Gate[2] to Blue
 

Attachments

  • way gate test.w3x
    13.5 KB · Views: 152

Sgqvur

FullOfUltimateTruthsAndEt ernalPrinciples, i.e shi
Reaction score
62
Sry for double post but this is important.

It turns out you don't need Regions to use Way Gate Destinations with triggers.

I think that you have changed the Way Gate's Pathing - Pathing Map in the Object Editor right? =)

Well just reset the Pathing Map of the Way Gate in the Object Editor to its default and it will work with points ... silly me ^^
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top