• 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] "Unit Count in Transport"?

Status
Not open for further replies.
Level 1
Joined
Apr 29, 2008
Messages
2
Hey, I'm new here, but I've been doing WC3 maps for quite a while.
I'm working on a modern map, and am hoping to use a kind of "vehicle ownership" system- if you're in a vehicle, you own it, if you aren't in it, well, you don't own it.

I've got 90% of it down (or so I'd like to think) but I ran into a roadblock with trying to get something like this:

"If (Number of units in transport) equals 0, then change ownership of (transport) to Neutral Passive."

Looks simple, but I cannot for the life of me get it right!

You got any ideas?
 
Level 12
Joined
Mar 23, 2008
Messages
942
If your problem is with find if there is a unit inside or not the car.
Do that:

Unit is issued a order with no target
Issued Order is Equal to unload
Set Custom Value of Ordered unit to 1

Unit - Custom value of unit-type of car is equal to 1
Player - Change owner to Neutral Passive
 
Status
Not open for further replies.
Top