• 🏆 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!

[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,201
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