• 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] Moving way gate

Status
Not open for further replies.
Level 6
Joined
May 31, 2008
Messages
218
I need both ideas and possible solutions to a problem i encountered, which is that i want a flying ship to be able to land and then act as a waygate to the interior of the ship.

The layout of the whole thing is that i have a "dungeon" acting as the interior of the ship. The dungeon is just an enclosed area on the map where the only entrance is a waygate which is always stationary. The region under this waygate is also always stationary.

Then i have this airship that you can move, which also can land, turning it into a waygate so you can unload the units you have in the dungeon/interior of the ship. It's not hard to move the region to where the ship landed, but i am having problems making the waygates work.

Right now the ship have the storm crow ability to make it do a nice landing, and the alternate form of the ship, which is the landed ship, have the waygate ability. But the problem is, i can't seem to make the waygates connect, as i don't know how to enable the waygate on a unit that do not exist at the start of the game.

So i need either help fixing a trigger for this, or if some one have a good idea how to solve this problem in any other way.

If you do NOT understand what i am asking for, or if you want more information, feel free to ask and i will try to explain further.
 
Level 5
Joined
Apr 22, 2011
Messages
152
You may for example make a dummy way gate unit, which moves to that ship every time it lands and returns back (to somewhere you could not find it) when it goes up. And also you can make a trigger that moves a unit which comes close enough to the landed ship to the interior instantly.
 
Level 9
Joined
Jun 7, 2008
Messages
440
You can have the airship and the waygates pre placed before initialization, then set it so that:
  • Events
    • Unit - A unit comes within 256.00 of AirShip(YOUR UNIT)
  • Conditions
  • Actions
    • Set temploc = (Position of (WayGate(YOUR WAYGATE)))
    • Unit - Move (Triggering unit) instantly to temploc
    • Custom script: call RemoveLocation(udg_temploc)
Otherwise, you have to set that bad boy and your waygates, if applicable, to a variable. Then simply do a periodic check every x seconds to see if there is a unit close to your variabled unit. Like this:
  • Airship Move
    • Events
      • Time - Every 0.50 seconds of game time
    • Conditions
    • Actions
      • Set AirLoc = (Position of (Variabled Airship))
      • Set temploc = (Position of (WAYGATE))
      • Set tempgroup = (Units within 256.00 of AirLoc)
      • Unit Group - Pick every unit in tempgroup and do (Actions)
        • Loop - Actions
          • Unit - Move (Picked unit) instantly to temploc
      • Custom script: call RemoveLocation(udg_AirLoc)
      • Custom script: call RemoveLocation(udg_temploc)
      • Custom script: call DestroyGroup(udg_tempgroup)
That should just about sum it up. If you want it done in Jass its a little easier. Create a global unit and basically do the same as mentioned above. :) Hope that helps.
 
Level 6
Joined
May 31, 2008
Messages
218
Also thought about that thing with teleportation via triggers, but problem is that you might not want to enther the ship, as it can be dangerous. Right now i came up with an idea on my own with having the ship use an ability, and then it get's ensnared when it uses that ability. Once it's ensnared the waygate ability is activated. If waygates work when units are ensnared.
 
Level 33
Joined
Mar 27, 2008
Messages
8,035
I have attached a test map
When the Airship lands (once every 10 second interval between Land and Fly), go to the Airship as near as possible and it will teleport you to the "dungeon"
Press the ESC button to escape from the dungeon (this is for repetitive tests)
The teleport only works when the Airship lands
 

Attachments

  • Simple Moving Teleport System.w3x
    16 KB · Views: 54
Level 6
Joined
May 31, 2008
Messages
218
I have attached a test map
When the Airship lands (once every 10 second interval between Land and Fly), go to the Airship as near as possible and it will teleport you to the "dungeon"
Press the ESC button to escape from the dungeon (this is for repetitive tests)
The teleport only works when the Airship lands

Actually i figuered it out on my own. I used a dummy ability that caused the ship to be ensnared. And then via triggers it's connected to the dungeon and the other way around when you use another dummy ability to let it fly agian.
 
Level 6
Joined
May 31, 2008
Messages
218
No, but it sounded as if you were using triggers to move the units. Which means you will instantly teleport if you get to close. I am trying to stay away from that, so you don't accidentally get teled into the dungeon.
 
Status
Not open for further replies.
Top