• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

Nydus Canal/Waygate help

Status
Not open for further replies.
Level 5
Joined
Feb 16, 2005
Messages
103
I've created a buildable, player-controlled Nydus Canal-like unit. It has an ability based on "Item Build Farm" to create a corresponding exit canal. Both the original and exit buildings have the Waygate ability. I've made a trigger to remove the "Item Build Farm" ability after the exit is built, and I've made another trigger that enables the exit canal and grants teleportation back to the original. The problem I'm having is I can't find a trigger to make units teleport from the original back to the exit.

If you have a better way of doing it, I'm all ears. I want this system to work just like Nydus Canals from StarCraft. Any ideas? Thanks in advance!
 
Last edited:
Level 8
Joined
Jun 1, 2008
Messages
341
as far as I know you cannot use a way gate ability that has not been predefined, therefore, the only way I can suggest doing it is as such:

  • Create Canal
    • Events
      • Unit - A begins Construction
    • Conditions
      • Unit-type of (Constructed Structure) is (equal to) (Canal Enterance)
      • Unit-type of (Constructed Structure)) is (equal to) (Canal Exit)
    • Actions
      • -------- //Actions --------
      • if (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
        • Unit-type of (Constructed Structure)) is (equal to) (Canal Enterance)
          • Then - Actions
            • Unit - Set custom Value of (Constructed Structure) to (CanalInteger)
            • Set (CanalInteger) = ((CanalInteger) + (1))
          • Else - Actions
            • Unit - Set custom Value of (Constructed Structure) to ((Custom Value of (Constructing Unit)))
  • Teleport System
    • Events
      • Unit - A Unit is given an order targeting a unit
    • Conditions
      • (Ordered unit) is (not equal) to (target of issued order)
    • Actions
      • -------- //Setup Variables --------
      • Set TempPoint = (position of (ordered unit))
      • Set TempPoint2 = (position of (target of issued order))
      • -------- //Actions --------
      • if (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • Distance between (TempPoint) and (TempPoint2) (less than) (250)
        • Then - Actions
          • Set TempGroup = (units in (playable map area) matching ((Unit-type of (Matching Unit) is = (Canal Exit)) And (Custom Value of (matching unit) is equal to (Custom Value of Target unit of issued order))
          • Unit Group - Pick every unit in TempGroup and do (Actions)
            • Loop - Actions
              • Set TempPoint3 = (Position of Picked Unit)
              • Unit - Move (Ordered Unit) instantly to (TempPoint3)
              • Special Effect - Create a special effect at (TempPoint2) using (Waygate Effect (You need to find this yourself))
              • Special Effect - Destroy (last created special effect)
              • Special Effect - Create a special effect at (TempPoint3) using (Waygate Effect (You need to find this yourself))
              • Special Effect - Destroy (last created special effect)
              • Custom script: call RemoveLocation(udg_TempPoint3)
            • Custom script: call RemoveLocation(udg_TempPoint)
            • Custom script: call RemoveLocation(udg_TempPoint2)
        • Else - Actions
Sorry wrote that trigger freehand so it will no be exactly the same in world editor, but you get the idea..? hope this helps, spent about 20 minuets guessing the different actions etc..

You will also need to remove variables but I havent got time to do that
 
Last edited:
Status
Not open for further replies.
Top