How do I issue an order to unload only ONE unit from a bunker? So for example, if a Bunker has 4 Marines and I want to unload only one of the Marines (stored in a variable), how do I achieve it? Thanks.
You will need to do a iterate transport effect (with a max count of 1). For each unit found, do an issue order effect (unload target unit), with target set to target unit, and the unit to be ordered being Outer unit (the transport unit itself, which in this case is the bunker).
I'm stuck with the issue order effect. By what I read here I thought the Iterate Transport effect would have the passenger unit as its target, so I could use that for the unload order, but it doesn't work. I need to have it inside the effect tree for a targeted ability (used by the transport unit), but it only works if I target one of the passenger units, if I target anything else nothing happens.
If you don't have issues "hybridizing" your ability, the trigger action "set target passenger" can be used to redirect an order to an unit.
I'm attaching an example, where I create 2 marines and a marauder as cargo inside a bunker, and uload only the marauders.
BTW, the trigger won't work if you don't save the order as a variable, since there's where the target passenger is stored.
EDIT: I forgot to add that to make this work, the transport ability has to have a button for the "unload unit" command, and that's the one that has to be used in the issue order action.
How do I issue an order to unload only ONE unit from a bunker? So for example, if a Bunker has 4 Marines and I want to unload only one of the Marines (stored in a variable), how do I achieve it? Thanks.
@Chris97Ong: Go
You will need to do a iterate transport effect (with a max count of 1). For each unit found, do an issue order effect (unload target unit), with target set to target unit, and the unit to be ordered being Outer unit (the transport unit itself, which in this case is the bunker).
I would try to pick each unit in the cargo and validate if that unit is the same unit in your variable and then unload that unit.
I'm stuck with the issue order effect. By what I read here I thought the Iterate Transport effect would have the passenger unit as its target, so I could use that for the unload order, but it doesn't work. I need to have it inside the effect tree for a targeted ability (used by the transport unit), but it only works if I target one of the passenger units, if I target anything else nothing happens.
If you don't have issues "hybridizing" your ability, the trigger action "set target passenger" can be used to redirect an order to an unit.
I'm attaching an example, where I create 2 marines and a marauder as cargo inside a bunker, and uload only the marauders.
BTW, the trigger won't work if you don't save the order as a variable, since there's where the target passenger is stored.
EDIT: I forgot to add that to make this work, the transport ability has to have a button for the "unload unit" command, and that's the one that has to be used in the issue order action.
Check out my kitbashes! Custom Campaign Initiative: Lots of great Custom Campaigns!! Check out and Support!!