I'm trying to design a trigger that only unloads the chosen unit from cargo while leaving the rest of the occupants inside, but all I can seem to find for unloading is 'unload all'. Can anybody point me in the right direction please?
I tryed to do this yesterday and couldn't find the command either. But it wasn't that important to unload only one for me, so I left it with unload all.
On a second tought, try to order a unit inside to move to a point outside. If that works you can try a workaround.
I don't think this is possible as the unload ability is multiphase (i.e. first you would need to target the unit, then you would need to target the unload point.) Unfortunately there is no way of issuing multiphase orders via triggers. This is the same problem as ordering a unit to drop a specific item in its inventory, and the same workaround applies: create a new copy of the unit outside the transport and kill the one in the transport.
Nah, they won't move out when in the bunker unfortunately. I currently have that built into the trigger already for after the unit exits. The move trigger activates if I manually exit the bunker, but will not activate while inside it.
This is very important for me as I have multiple players units in a neutral bunker and I wish to disable the cargo interface so they can't see or eject each other when they are inside, but can still eject a single unit.
That's a good idea. I could cache the unit and remove it then load it back in outside the bunker.
The way I was thinking the trigger feature would work though, is by triggering a click on the cargo interface for the appropriate slot which is determined by the find cargo position. I am of course also assuming you could still trigger a click on a UI which is hidden.
I mean, If I can click something in the basic game you would think there would be a way to trigger that click also.
Thanks for the replies.
EDIT: There is also a command under the Bunker load/unload ability called UnloadUnit, along with Load, UnloadAll, UnloadAt and Loadall and is it possible to string or reference the command linked to a unit (variable)?
EDIT2: Also, it does not have to be multi-phase exactly, as you could click the target point yourself. Or make a later action do that part for you. In fact I don't even require a target point to exit to, just exit next to it like when you click the unit or unload all.
Your probably not using the correct action for ordering the unit to unload the unit.
And Im not sure how you disabled the user from being able to unload units. But the way you went about that may be interferring with the units order to unload a specific unit.
Instead of disableing the order all together why not do this.
Events
Unit is given order to unload unit
Conditions
If Owner of Unit(Unit to be unloaded) != triggering player
I didn't know you could cancel an order. I'll have to try that.
Thanks
Want you can do is remove the orders that are qued for the unit. You might not beable to do this before the unit is unload. Thats why I also say you should tell the Unit that was unloaded to be loaded again just incase the unit is unloaded. Should all happen so fast that you prolly wont notice.
Rollback Post to RevisionRollBack
Skype
KageNinpo = SN
My Libraries
DialogLeaderboard & TeamSort
My Projects
SPACEWAR Tribute
Infinite TD
To post a comment, please login or register a new account.
I'm trying to design a trigger that only unloads the chosen unit from cargo while leaving the rest of the occupants inside, but all I can seem to find for unloading is 'unload all'. Can anybody point me in the right direction please?
Also, If it matters/helps at all I'm using the bunker load/unload system.
I tryed to do this yesterday and couldn't find the command either. But it wasn't that important to unload only one for me, so I left it with unload all.
On a second tought, try to order a unit inside to move to a point outside. If that works you can try a workaround.
Or maybe another workaround is killing the unit inside and make the same unit spawn on top of the cargo and move out in a way.
I don't think this is possible as the unload ability is multiphase (i.e. first you would need to target the unit, then you would need to target the unload point.) Unfortunately there is no way of issuing multiphase orders via triggers. This is the same problem as ordering a unit to drop a specific item in its inventory, and the same workaround applies: create a new copy of the unit outside the transport and kill the one in the transport.
@fr0d0b0ls0n: Go
Nah, they won't move out when in the bunker unfortunately. I currently have that built into the trigger already for after the unit exits. The move trigger activates if I manually exit the bunker, but will not activate while inside it.
This is very important for me as I have multiple players units in a neutral bunker and I wish to disable the cargo interface so they can't see or eject each other when they are inside, but can still eject a single unit.
@RileyStarcraft: Go
That's a good idea. I could cache the unit and remove it then load it back in outside the bunker.
The way I was thinking the trigger feature would work though, is by triggering a click on the cargo interface for the appropriate slot which is determined by the find cargo position. I am of course also assuming you could still trigger a click on a UI which is hidden.
I mean, If I can click something in the basic game you would think there would be a way to trigger that click also.
Thanks for the replies.
EDIT: There is also a command under the Bunker load/unload ability called UnloadUnit, along with Load, UnloadAll, UnloadAt and Loadall and is it possible to string or reference the command linked to a unit (variable)?
EDIT2: Also, it does not have to be multi-phase exactly, as you could click the target point yourself. Or make a later action do that part for you. In fact I don't even require a target point to exit to, just exit next to it like when you click the unit or unload all.
@RileyStarcraft: Go
This is the conclusion I have come to as well. Been messing with it for hours.
if you have the unit saved to a unit variable you should be able to order the bunker to unload that specific unit
@SouLCarveRR: Go
I agree; but I wasn't able to get that to work.
I also have the added problem of not being able to let the user manually unload them; that's why I went the copy unit route.
Your probably not using the correct action for ordering the unit to unload the unit.
And Im not sure how you disabled the user from being able to unload units. But the way you went about that may be interferring with the units order to unload a specific unit.
Instead of disableing the order all together why not do this.
@SouLCarveRR: Go
I didn't know you could cancel an order. I'll have to try that.
Thanks
Want you can do is remove the orders that are qued for the unit. You might not beable to do this before the unit is unload. Thats why I also say you should tell the Unit that was unloaded to be loaded again just incase the unit is unloaded. Should all happen so fast that you prolly wont notice.