| 02-04-2006, 09:25 AM | #1 |
Warcraft has various conditions to check if a unit *is being carried*, but there aren't any, that I can see, to check if a particular transport has a unit within or not. So, have I just missed something, or can somebody suggest a method of finding out if a unit is carrying another unit? Perhaps some JASS? Any help at all would be appreciated. |
| 02-04-2006, 09:34 AM | #2 |
As far as I know there is no way to check if a unit is inside a transport. But there may be workarounds, by detecting when a unit gets into a transport. |
| 02-04-2006, 09:45 AM | #3 |
| 02-04-2006, 02:32 PM | #4 |
I'm not that stupid. I want this to check if a *certain transport* contains *a unit.* If I wanted to check if a *specific unit* was in a transport that condition might have worked. |
| 02-04-2006, 04:25 PM | #5 |
You're gonna need two vars for this : numTransports (Integer) and unitsCarried (Unitgroup Array) Trigger: Now we have a unitgroup corresponding to the custom value of the unit, and thats all we could ever ask for, right? Trigger: PS! I'm not sure exactly what the action is that recognizes when a unit is unloaded. Check out different orders to see if there's a particular order that occurs when it happens, and if all else fails, you can always do something (hackish) like this Trigger: That may be a little laggy however. Anyways, hope I helped ![]() |
| 02-04-2006, 05:59 PM | #6 |
You see, the whole unload thing is the main problem with any kind of tracking system such as this; I know how to respond to the Unload ability, but not how to respond to somebody clicking the portrait in the unit info area. It's damnded annoying. |
| 02-04-2006, 06:08 PM | #7 |
| 02-04-2006, 06:17 PM | #8 |
As correct as that may seem, I've just tested it and the trigger ain't firing... But interesting point. |
| 02-04-2006, 07:46 PM | #9 |
As a continuation of my other trigger, I did some experimentation with WE just because it was bothering me: Trigger: It works. Do I win the prize? :D |
| 02-04-2006, 09:21 PM | #10 | |
Quote:
--- just follow johnfn's way it is the only one known this far |
| 02-05-2006, 09:25 AM | #11 |
Well, I posted a similar thread on the battle.net forums and they came up with a more convenient way... Do a check for the number of units in the unit group - units owned by player matching (matching unit) is in (transport). ON another note, does the Unload order fire when you click the portrait too? If it does, you're getting rep anyway. |
