There is currently no way to unload a specific unit using data or triggers. The order that does so is bugged: it appears to be mistakenly flagged as an order which takes no target, even though it does in fact have a target. So if you attempt to construct an order to unload a specific unit(ie if you use any transport ability's command index 3, labeled as 'Unload Unit') the editor will not allow you to specify a target for the order. Furthermore there appears to be no way to trick the editor into constructing an order which would work.
Confusingly, there is another command, this one having index 2, and being labeled "Unload Target" but this one does not appear to be the one used even though it is flagged as allowing a target. Attempts to get this command to do any thing at all have so far failed and it is a real mystery what it is used for.
We have verified that it is in fact command index 3 that is being used by capturing the order when the user clicks a units icon in the cargo hold to remove it. The command index is then easily queried and found to be 3. Saving such an order order to a variable and issuing it again via triggers reveals that it will only ever unload the exact same unit the player first clicked on to be unloaded, so the order is clearly storing a target; however, when queried about what kind of order it is, this same order shows that it is flagged as an order with no target(order type 0).
This is a very old bug, probably around since release. Here is a related bug report from 3 years ago: http://us.battle.net/sc2/en/forum/topic/540954652 . That bug report suggests that a side effect of this bug is that any kind of Unload Validator which queries something about the target being unloaded (ie does the unit attempting to unload have a certain buff) does not work. Simply because the order (although it has a target) is flagged as not having a target, so the game presumably doesn't bother checking attributes of the target. I have verified that related bug is also still present.
Ok, this is NOT a bug. There is a function hidden away in the API called OrderSetTargetPassenger. This lets you specify the target for an unload order that you first make as an order with no target.
So yeah apparently orders can have targets and they can have targetpassengers.
Rollback Post to RevisionRollBack
To post a comment, please login or register a new account.
Cut and paste of a bug report I just posted to battle.net: http://us.battle.net/sc2/en/forum/topic/10014151673
There is currently no way to unload a specific unit using data or triggers. The order that does so is bugged: it appears to be mistakenly flagged as an order which takes no target, even though it does in fact have a target. So if you attempt to construct an order to unload a specific unit(ie if you use any transport ability's command index 3, labeled as 'Unload Unit') the editor will not allow you to specify a target for the order. Furthermore there appears to be no way to trick the editor into constructing an order which would work.
Confusingly, there is another command, this one having index 2, and being labeled "Unload Target" but this one does not appear to be the one used even though it is flagged as allowing a target. Attempts to get this command to do any thing at all have so far failed and it is a real mystery what it is used for. We have verified that it is in fact command index 3 that is being used by capturing the order when the user clicks a units icon in the cargo hold to remove it. The command index is then easily queried and found to be 3. Saving such an order order to a variable and issuing it again via triggers reveals that it will only ever unload the exact same unit the player first clicked on to be unloaded, so the order is clearly storing a target; however, when queried about what kind of order it is, this same order shows that it is flagged as an order with no target(order type 0).
This is a very old bug, probably around since release. Here is a related bug report from 3 years ago: http://us.battle.net/sc2/en/forum/topic/540954652 . That bug report suggests that a side effect of this bug is that any kind of Unload Validator which queries something about the target being unloaded (ie does the unit attempting to unload have a certain buff) does not work. Simply because the order (although it has a target) is flagged as not having a target, so the game presumably doesn't bother checking attributes of the target. I have verified that related bug is also still present.
Ok, this is NOT a bug. There is a function hidden away in the API called OrderSetTargetPassenger. This lets you specify the target for an unload order that you first make as an order with no target.
So yeah apparently orders can have targets and they can have targetpassengers.