Using Waygates

Discussion in 'Tutorial Repository' started by PB_and_J, Oct 20, 2005.

  1. PB_and_J

    PB_and_J level 85 anti-spammer

    Welcome to my first tutorial. It isn't much, but at least it can be used if someone needs help with a Waygate later on. So here it is:

    Waygates, The Fastest Way From A to B​

    First off, a few things to know about a Waygate:

    What is a Waygate? A Waygate is a neutral passive owned building that lets units that enter its vicinty to teleport to a conected Waygate.

    Where can I find a Waygate? The Waygate is a building found under: Unit Palette > Neutral Passive > Buildings.

    Why use a Waygate? A Waygate is a building that adds that litle bit extra to a map. It is fuctional and practical. It can be used to travel to the other side in a large map, or can be used for a quick getaway from a enemy army in hot pursuit.

    Allright, time to get to the good stuff, how to use a Waygate.

    So, you placed 2 Waygates on the map in the places you want them to be at.
    Start off by double-clicking the Waygate. Here you can choose if you want it to be player owned, its destination, and its color.

    Player Owned: Pretty simple, I don't think I need to explain this.

    Destination: Here's the tricky part. For a Waygate to work you need 2 regions, which are placed right under your 2 Waygates. I will call them: Region A and Region B, I will also call my Waygates: Waygate A and Waygate B.

    Region A will be placed under Waygate B, and vice-versa.

    Now double-click on the Waygate A and check that the Waygate is active. Now you may select a region that it will go to. So to make the Waygate work, you will need select Region A as the destination.

    But were only half done, Now double-click on Waygate B, check that it's active, and yes, you guessed it, select Region B as its destination.

    So you see, you need to have the regions and the Waygates to work together.

    Custom Color: The custom color function is cosmetic, as well as functional. It makes the Waygate look nice, as well as gives the player an idea where the Waygate teleports to.

    Now that you know the basics, time for some advanced things:

    A waygate is a building, and so it can be built, right? So when it is built it will not have a target, right?

    Here's a base trigger for the answear to this question:

    Melee Initialization
            Unit - A unit Finishes construction
            (Unit-type of (Constructed structure)) Equal to Way Gate
            Neutral Building - Set (Waygate) destination to (Center of (Playable map area))
    Well that will just put the destination to the middle of the map, it can work, however that may not be the casue.

    Here is another, more devolloped action, it requires a few triggers, 1 when the waygate is constructed, one when the constructing unit sets the position:

    Events Unit - A unit Finishes construction
            (Unit-type of (Constructed structure)) Equal to Way Gate
            Unit - Add Dummy Spell to (Triggering unit)
            Unit - A unit Begins casting an ability
            (Ability being cast) Dummy Spell
            Neutral Building - Set (Waygate) destination to (Target point of issued order)
            Unit -Remove Dummy Spell from (Triggering unit)
    For the first trigger, I gave my constructing unit a Dummy spell. The next trigger sets the postition of the waygate to the postion of the spell being casted, and removes the spell.

    However, setting the waygate destination will leak, use this code to remove the leak:

    custom script: call RemoveLocation( udg_TempPoint )
    Well that's it, my first tutorial, I'm pretty sure there's some typos, so if you find some please tell me and il fix them. Also, all feedback will be greatly appreaciated. I will add pictures in a bit, however I dont know who to directly add them to a thread (not an attachment).

    • Like Like x 1
  2. WastedSavior

    WastedSavior A day without sunshine is like, well, night. Staff Member

    lol i like it, its down to the point, and even an idiot like me could figure it out
    but waygates isn't exactly the hardest thing to explain :p your good, you should write bigger tutorials on more important things
  3. PB_and_J

    PB_and_J level 85 anti-spammer

    Thx, I wanted to start small, and get the feel to how a tutorial runs. I might think of wrighting another one in the near future, however I need a topic.
  4. Dipski

    Dipski Guest

    Shouldn't waygate A teleport to region A and Waygate B teleport to region B
    Because the way you have it, they teleport to the location they start at :confused:
    • Like Like x 1
  5. AceHart

    AceHart Your Friendly Neighborhood Admin

    They should. Fixed.
  6. AgentPaper

    AgentPaper From the depths, I come.

    You should explain the player owned thing, NEVER say, "I think this is simple, so I won't explain it" in a tutorial, the whole point is TO explain it. Plus, I have no idea what it does, does it just change the color? only let that player through? only let him and his allies? nothing at all?
  7. PB_and_J

    PB_and_J level 85 anti-spammer

    Added a bit more with help from UnknowVector, Il do a bit more tomorow.
  8. AceHart

    AceHart Your Friendly Neighborhood Admin

    > (Target point of issued order)

    Position of (Target unit of ability being cast).

    Maybe both ways.
    And make sure you can't target an enemy gate (unless you want that as a feature).
  9. UberNoob

    UberNoob Guest


    I need help with something :banghead:

    about warping :banghead:

    Im trying to make two circles of power on each side of this wall but i only want ONE force to use it

    i tryed my own but.. either no one can use it or both can

    :confused: can someone help me :confused:
  10. ReVolver

    ReVolver Moderator Staff Member

            Unit - A unit enters ([I]Your Region[/I])
            ((Triggering player) is an ally of Player 1 (Red)) Equal to True
            [I]Your Actions[/I]

    Here's one you can use that uses a force check.
  11. UberNoob

    UberNoob Guest


    i cant see the condition... :eek:

    can i have directions
  12. _Azuri3l_

    _Azuri3l_ Guest


    There is bug in this trigger! Cuz...
    (Owner of (Entering unit) is an ally of (Player 1 Red) equal to true)
    This is condytion that should work man xP
  13. WC3_GOD

    WC3_GOD Guest

    good job!!!

    Very nice and VERY helpful. Well done!!! :D
  14. Doomsday

    Doomsday Guest

    It's okay if you already don't know how to use a waygate.
    You should fix the trigger code, the Events sub-heading is right next to the events that are used in the code.
  15. WaRRioT

    WaRRioT Guest

    Waygate trouble

    I get how to use waygates, but when i double click a waygate, the box that says "enable transport blah blah blah" (the one that lets you enable the waygate to go somewhere)is grey and I can't check it. When I checked in the object editor, it says the transport ability of waygates was enabled...Can anyone help?
  16. zomgguy

    zomgguy New Member



    This is because you haven't created any regions. Once you have created a region, the check box will be enabled and you can select one of your existing regions. I had this problem before too...luckily i figured it out myself =)

    good luck

Share This Page