Connect 2 builded Waygates - possibe?

enZen

New Member
Reaction score
0
Hi, what if i need 2 or more builded waygates to get connected, is it eaven possible? i cant find any actions making it possible.. Im going to make like when i kill a building a waygate spawns, and when i kill another a waygate will spawn there 2, i figured out how to spawn waygates but i cant get em connected.

dindnt find any other threads with the same question.

/cheers
 
U

Ur-Quan

Guest
If you searched atleast you would found waygate tutorial.
This shouldn't be here in the JASS zone.
 

esb

Because none of us are as cruel as all of us.
Reaction score
329
I think what he wants is lets say a Peasant to build a waygate. He builds another waygate, and both of the last built waygates connect. I believe it could be done with a few arrays and points (x,y). not sure if it could be multiplayer.
 

enZen

New Member
Reaction score
0
i did search Ur-Quan, but i dint find anything that works for me, and the tutorial dont tell me how to connect 2 newbuilded waygates. only how to connect a new builded waygate with a old region.
 

Halofan

New Member
Reaction score
7
If you're looking for the waygates to spawn through triggers, you could hide the waygates, and then unhide them when the proper conditions are met. It should look something like this:

Code:
WaygateSpawnPT1
Event
   Map Initialization
Conditions
Actions
   Hide <waygate000>
   Hide <waygate001>
   etc.

And then:

Code:
WaygateSpawnPT2
Event
   <Your Event>
Conditions
   <Your Conditions>
Actions
   Unhide <waygate000>

And of course, if this doesn't exactly work, you can edit the specifics.
 
L

lordpredator

Guest
you can make the first waygate build the second... similar to starcraft zerg waygate (i don´t remember the name... nest?)... or you can give the waygates a dummy ability to target units, check by trigger the target unit type (if it a waygate) and then set the destination of that waygate.

i don´t know how the waygates work... if the target has to be a location or a rect... if has to be a rect you can make the rect around the destination trigger when is set, i know WEU have funtions to create rect but don´t remember if WE has.

LP
 

Halofan

New Member
Reaction score
7
The name your thinking of is the Nydus Canal. And I think that what he wants is a neutral waygate that is built after completing a task (maybe as a way to travel back and forth between areas that he's already completed?). And Waygates utilize regions. While it might be possible, I don't know if it could be done in the Trigger Editor. I think the best solution would just be to just hide the Waygates, and when the Waygates are needed, they should just be unhidden. Much simpler that way;).

*EDIT*

I didn't notice Phyrexian's solution:eek:. That would definitely work...
 

Hero

─║╣ero─
Reaction score
250
The name your thinking of is the Nydus Canal. And I think that what he wants is a neutral waygate that is built after completing a task (maybe as a way to travel back and forth between areas that he's already completed?). And Waygates utilize regions. While it might be possible, I don't know if it could be done in the Trigger Editor. I think the best solution would just be to just hide the Waygates, and when the Waygates are needed, they should just be unhidden. Much simpler that way;).

*EDIT*

I didn't notice Phyrexian's solution:eek:. That would definitely work...
Ahh..yes Starcraft...

Yes phyr's way will work
 

SerraAvenger

Cuz I can
Reaction score
234
Umm I don't think it will work for a cluster of waygates.

I could make it on two ways:

1. Way: A dialog appears when you enter the waygate where you can choose the destiny of the waygate

2. Way: When ever you enter the waygate, you will be sended to the next one. Will require LOTs of time if you want to travel one time back but you have 20 Waygates ;)

1. way first:

You need:
a region array (with the locations of the waypoints), i call it waypointloc
a string array (withthe names of the region), i call it waypointnames
a dialog button array (for the dialog), i call it waypointbuttons
a dialog variable ( the dialog itself), i call it waypointdialog
an integer ( if mui, array so it fits for each player) (to save your progress so you can't move to a region you did not discover/enable yet), i call it playerprogress
an integer to indicate from wich area the waygate was activated, i will call it waygatestart

Sry I'm in a hurry so I will give you exact trigger code later, but this is what it is supposed to do:

First initialise all:
name the strings how you want them to be called,
Set the message of the Dialog to "Where do you want to go?"
and assign all waypointloc's to their regions
NOTE THAT YOU HAVE TO START WITH 0 WHEN YOU SET THE STRINGS, SO
waypointnames[0]=startingbase and waypointloc[0]=staringbaseportal (for example)

When ever a unit enters one of the regions in the region array, if playerprogress unequal to 0 (start value, so you can't move nowhere) then:
For each integer A from 0 to playerprogress
If entered region unequal to waypointloc[integer A]
Then:
Create a dialog button for waypointdialog called waypointnames[integer A]
set waypointbuttons[integer A] = last created dialog button
else:
set waygatestart = integer A
End if
Endloop
create a dialog button named "Cancel" for waypointdialog


Next trigger you need will move the unit to the center you need:

When a dialog button is pressed for waypointdialog,
then
for each integer A from 0 to playerprogress, if clicked dialog button is equal to waypointbuttons[integer A], then:
Pick every unit in waygatestart
move picked unit (instantly) to random point in region waypointloc[integer A]
endif
clear waypointdialog
set the message of waypointdialog to "Where do you want to go?"

Not leak free, I will send you the JASS trigger later... tomorrow if I manage it.

If you can do it yourself now, please post it so I don't have to do it all again ;)

Greetings Serra

EDIT:

Are these buildings at a certain region or are they just like builidings in a melee map?
So if you want you can instead of waypointloc as regions use waypointloc as unit array. If you want it so just ost it and I will chang eit for you so that it works with new portals created. Still you have to wait till tomorrow. GL, Serra.
 

Rinpun

Ex TH Member
Reaction score
105
*Sigh*

Use Phyrexian's solution, and a single unit array for each player that sets to the latest waygate made. If a waygate is made and the unit is null, set the waygate variable for that player to the waygate unit. If the waygate is made and the unit is a waygate, use the trigger Phyrex suggested to set both waygate's destination location to each other, then set the unit back to null. Only issue is that the player will have to remember where his waygates are. Maybe each waygate should have an ability to transfer its location to another waygate, and have that waygate point back to it. Easy enough to do--just base it all on what Phyrex suggested.

No need to do all these other complicated solutions with unneeded variables.
 

SerraAvenger

Cuz I can
Reaction score
234
yes but the way I suggested will be better if used for an rpg, or something like that. It will be more userfriendly if you only enter the Portal, and then you can just click by dialog where you want to go. If each time you have to use this ability to stick two waypoints together, it will be difficult for multiplayer ( what if two players use both the same waypoint as destiny/startpoint? then both players will exchange their position, or one of them will not be able to voyage to his target. ( atleast if you destroy all connections that are only in one direction. Wich will be makeable with an unit array with 4 fields))



Too, I don't know wether he wants:
Waypoints created on a certain point ( perhaps on preconstructed buildings...)
Then, my triggers will be easier to be used.

or waypoints created whenever a building (perhaps of a certain type) is destroyed at that buildings location.
Then, A dialog would be really bad. If you want to make it like this, ringpuns idea is not that bad. Still there consist the problem mentioned above.
Just say how you prefer it, or do it yourself.

Greeting Serra
 
O

oldmanwinter

Guest
if you want to make it so every time you build 2 waygates consecutively, they'll be connected, then you could make a unit variable called waygatevariable or something, set the default value to "no unit" and then make a trigger like-

event- unit finishes construction of a unit (i don't have WE in front of me so i'm kind of pulling this out of my ass)
condition- unit-type of unit being built = waygate
actions- if waygatevariable = no-unit
... then- set waygatevariable = (unit being built)
... else- set temp_point = position of (unit being built)
..... neutral building- set (waygatevariable) destination to temp_point
..... custom script- remove temp_point
..... set waygate variable to no-unit

that basically makes it so when you build the first waygate, it saves it, and when you build a second waygate it's set to be the teleport destination of the first waygate, and you can build as many pairs of waygates as you want. if you want it to work for individual players in a multiplayer game, make the waygatevariable an array of 1-12, and refer to it as waygate(playernumber of (owner of(unit being built))). like i said, i don't have WE in front of me atm, but i thiiiink a trigger like this would work
 

Romek

Super Moderator
Reaction score
963
if you want 2 last way gates linked:

build 1 waygate, set it to a variable
next waygate built, set to variable, link them.

i think you should just use rally points though. thats what i do with built way gates... (or a spell that can only target way gate :rolleyes: )
 

enZen

New Member
Reaction score
0
hmmm, ive been trying alot but i cant rly get one to work like i want, sry for late reply, havent ben building for a while.

well, what i want is like: i got 12 bases, when u kill one a neutral waygate spawn on the start location of the base, its not a one way map so u can kill the bases in any order, thats make it hard to connect the waygates. if its eaven possible, ive tryed some of your ideas but thay dont work out for me.
why i want a waygate to spawn is becouse the map is large and when u kill one u dont have to run across the whole map to get to next enemy instead u use the waygate to get closer... if u understand... :/

anyone who mabey can build a demo map for me? if its not to hard. coss i have no idea left how to do this
 

denmax

You can change this now in User CP.
Reaction score
155
This one
Create 12 Regions.. (Anywhere in a small size)
Also a Unit Variable with checked Array
Also a Point Variable
Code:
Create WayGate1
     Events
        Unit - A unit dies
     Conditions
        (Unit Type of (Dying Unit)) Equal to (Main Base)
     Actions
        Set DeadMBLoc = (Position of (Dying Unit))
        Set DeadMBLocFirst = (Position of (Dying Unit))
        Unit - Create 1 Way Gate for Neutral Passive on (DeadMBLoc)) Facing Default Facing Degrees
        Set WayGate[1] = (Last Created Unit)
        Turn On (Create WayGate2)
        Turn Off (this trigger)

DeadMBLocFirst will have its purpose soon..

Code:
Create WayGate2
     Events
        Unit - A unit dies
     Conditions
        (Unit Type of (Dying Unit)) Equal to (Main Base)
     Actions
        Set DeadMBLoc = (Position of (Dying Unit))
        Unit - Create 1 Way Gate for Neutral Passive on (DeadMBLoc) Facing Default Facing Degrees
        Set WayGate[[B]2[/B]] = (Last Created Unit)
        [B]Region - Center (WayGateTeleport1) on (DeadMBLoc)
        Neutral Building - Set (WayGate[1]) destination to WayGateTeleport1
        Neutral Building - Enable WayGate[1][/B]
        Turn On (Create WayGate[B]3[/B])
        Turn Off (this trigger)

Code:
Create WayGate3
     Events
        Unit - A unit dies
     Conditions
        (Unit Type of (Dying Unit)) Equal to (Main Base)
     Actions
        Set DeadMBLoc = (Position of (Dying Unit))
        Unit - Create 1 Way Gate for Neutral Passive on (DeadMBLoc) Facing Default Facing Degrees
        Set WayGate[[B]3[/B]] = (Last Created Unit)
        Region - Center (WayGateTeleport[B]2[/B]) on (DeadMBLoc)
        Neutral Building - Set (WayGate[[B]2[/B]]) destination to WayGateTeleport[B]2[/B]
        Neutral Building - Enable WayGate[[B]2[/B]]
        Turn On (Create WayGate[B]4[/B])
        Turn Off (this trigger)

Repeat this twelve times with the edits then after that, add this triggers to the twelve after..

Code:
Actions
   [The previous actions till Turn On action]
   Region - Center (WayGateTeleport[B]12[/B]) on (DeadMBLocFirst)
   Neutral Building - Set (WayGate[[B]12[/B]]) destination to WayGateTeleport[B]12[/B]
   Neutral Building - Enable WayGate[[B]12[/B]]
   [B]Custom Script: call RemoveLocation(udg_DeadMBLocFirst)[/B]
   [B]Custom Script: call RemoveLocation(udg_DeadMBLoc)[/B]
   Turn Off (this trigger)

THIS WILL CREATE A CHAIN OF TELEPORTATION, thats what your looking for, right?
 

enZen

New Member
Reaction score
0
This one
Create 12 Regions.. (Anywhere in a small size)
Also a Unit Variable with checked Array
Also a Point Variable
Code:
Create WayGate1
     Events
        Unit - A unit dies
     Conditions
        (Unit Type of (Dying Unit)) Equal to (Main Base)
     Actions
        Set DeadMBLoc = (Position of (Dying Unit))
        Set DeadMBLocFirst = (Position of (Dying Unit))
        Unit - Create 1 Way Gate for Neutral Passive on (DeadMBLoc)) Facing Default Facing Degrees
        Set WayGate[1] = (Last Created Unit)
        Turn On (Create WayGate2)
        Turn Off (this trigger)

DeadMBLocFirst will have its purpose soon..

Code:
Create WayGate2
     Events
        Unit - A unit dies
     Conditions
        (Unit Type of (Dying Unit)) Equal to (Main Base)
     Actions
        Set DeadMBLoc = (Position of (Dying Unit))
        Unit - Create 1 Way Gate for Neutral Passive on (DeadMBLoc) Facing Default Facing Degrees
        Set WayGate[[B]2[/B]] = (Last Created Unit)
        [B]Region - Center (WayGateTeleport1) on (DeadMBLoc)
        Neutral Building - Set (WayGate[1]) destination to WayGateTeleport1
        Neutral Building - Enable WayGate[1][/B]
        Turn On (Create WayGate[B]3[/B])
        Turn Off (this trigger)

Code:
Create WayGate3
     Events
        Unit - A unit dies
     Conditions
        (Unit Type of (Dying Unit)) Equal to (Main Base)
     Actions
        Set DeadMBLoc = (Position of (Dying Unit))
        Unit - Create 1 Way Gate for Neutral Passive on (DeadMBLoc) Facing Default Facing Degrees
        Set WayGate[[B]3[/B]] = (Last Created Unit)
        Region - Center (WayGateTeleport[B]2[/B]) on (DeadMBLoc)
        Neutral Building - Set (WayGate[[B]2[/B]]) destination to WayGateTeleport[B]2[/B]
        Neutral Building - Enable WayGate[[B]2[/B]]
        Turn On (Create WayGate[B]4[/B])
        Turn Off (this trigger)

Repeat this twelve times with the edits then after that, add this triggers to the twelve after..

Code:
Actions
   [The previous actions till Turn On action]
   Region - Center (WayGateTeleport[B]12[/B]) on (DeadMBLocFirst)
   Neutral Building - Set (WayGate[[B]12[/B]]) destination to WayGateTeleport[B]12[/B]
   Neutral Building - Enable WayGate[[B]12[/B]]
   [B]Custom Script: call RemoveLocation(udg_DeadMBLocFirst)[/B]
   [B]Custom Script: call RemoveLocation(udg_DeadMBLoc)[/B]
   Turn Off (this trigger)

THIS WILL CREATE A CHAIN OF TELEPORTATION, thats what your looking for, right?

I just tryed this but i get alot of errors, dunno what the problem is

seems to got the error away, but when i kill houses only the first waygate spawn, no more
 

SerraAvenger

Cuz I can
Reaction score
234
Are the 12 bases on predetermined places?
Are these bases owned by another player each?
So 1. base by player red, second one by player teal, and so on?
if any of them are answered with yes I can help you
If not, It is too much work for me too post all these triggers.
Perhaps in two weeks or so :p
Greeting Serra
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Staff online

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top