• 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] Cargo Hold

Status
Not open for further replies.
Level 3
Joined
Jan 4, 2007
Messages
18
I'm having trouble finding a way to check if theres a unit in the cargo hold of a building/unit. Also if possible how many units are there.

So far i've been checking if a unit is hidden but i'm just so very confused after doing all the trigger combinations i could think of o.o;

So far its something along the lines of figuring out how to

select all units if they are hidden
are they being transported by unit/building
 
Level 3
Joined
Jan 4, 2007
Messages
18
As i've read in the world editor. Hidden is when a unit is loaded in a transport, soulgem, alter, etc.

So i figured i would check for that 0.o
 

Dr Super Good

Spell Reviewer
Level 64
Joined
Jan 18, 2005
Messages
27,259
I devoleped a method over a year ago to do this but the system is pure jass.

You can detect when a unit is loaded into a transport so add 1 to its custom value. A order is issued when unloading, which you can use to reduce the value when units are unloaded. At any time, the custom value = the current number of transported units. Ofcourse my system used handlevars and not custom value but thats the easiest way to do it in GUI.
 
Level 3
Joined
Jan 4, 2007
Messages
18
Which order is issued when unloading?

I've got "A unit is issued an order with no target" for checking when a unit is unloaded.
 
Status
Not open for further replies.
Top