• 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.

Unload from a Transport Event

Status
Not open for further replies.
Level 8
Joined
Jul 18, 2010
Messages
332
Hi, I couldn't find any event for unloading a unit from transport event, just the loading to transport event. I made a trigger for it but I haven't tested it yet.
I want the most efficient solution for this so I'm posting it here. I also want the unit inside the transport to die when the transport die. That's what the transportno variable is for.

  • heliglyphs exit
    • Events
      • Player - Player 1 (Red) Selects a unit
      • Player - Player 2 (Blue) Selects a unit
      • Player - Player 3 (Teal) Selects a unit
      • Player - Player 4 (Purple) Selects a unit
      • Player - Player 5 (Yellow) Selects a unit
      • Player - Player 6 (Orange) Selects a unit
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • Or - Any (Conditions) are true
        • Conditions
          • And - All (Conditions) are true
            • Conditions
              • (Triggering unit) Equal to transport[(Player number of (Owner of (Triggering unit)))]
              • (transport[(Player number of (Owner of (Triggering unit)))] is loaded into transporter[(Player number of (Owner of (Triggering unit)))]) Equal to True
          • And - All (Conditions) are true
            • Conditions
              • (Ability being cast) Equal to Unload (Air Transports)
              • (transport[(Player number of (Owner of (Triggering unit)))] is loaded into transporter[(Player number of (Owner of (Triggering unit)))]) Equal to True
    • Actions
      • Unit - Set life of transport[(Player number of (Owner of (Triggering unit)))] to (Percentage life of transporter[(Player number of (Owner of (Triggering unit)))])%
      • Wait 0.03 seconds
      • Set transportno[(Player number of (Owner of (Triggering unit)))] = 0
 
Level 8
Joined
Jul 18, 2010
Messages
332
Thank you very much


EDIT: But wait, how would I detect if the hero came from the transport? There are somethings in my map that could coincide with that kind of event so I need a certain condition. Oh wait, will the transportno variable work?
When a hero comes in a transport, the hero's transportno will be 1 and then when he leaves, it will be 0.
For when the transport dies while the transportno is 1, the hero will die. I have 0.03 sec wait in the leaving the transport trigger, will that be MUI?
 
Thank you very much


EDIT: But wait, how would I detect if the hero came from the transport? There are somethings in my map that could coincide with that kind of event so I need a certain condition. Oh wait, will the transportno variable work?
When a hero comes in a transport, the hero's transportno will be 1 and then when he leaves, it will be 0.
For when the transport dies while the transportno is 1, the hero will die. I have 0.03 sec wait in the leaving the transport trigger, will that be MUI?

u would either need an array or a hashtable to make it MUI. also u should use the unit enters region event. if its in the transport the number is 1 so if that unit is number 1 then do the actions u want if its 0 then it is a unit that is being spawned on the map and not by the transport unit.
 
Status
Not open for further replies.
Top