[Trigger] A unit UNload a another unit?

Status
Not open for further replies.
the way I went around it was that when a unit fired the "unit is loaded ..." event, I saved that unit into unit group.
When unit leaves a transport, it fires the "unit enters region" event, so I used that. But the event fires for any unit (created, summoned, ...), hence I check if the triggering unit is in the "loaded" unit group. If yes, it was unloaded and I remove the unit from the unit group.
 
Alternatively, you can use Bribe's GUI Unit Event.
Bribe said:
Use the event "Game - CargoEvent becomes Equal to 1.00" to detect when a unit is loaded into a transport. Use the event "Game - CargoEvent becomes Equal to 2.00" to detect when it is unloaded.

You also have "CargoTransportUnit[(Custom value of Unit)]" to get the unit who is carrying the unit, and "CargoTransportGroup[(Custom value of Transport)]" to pick all units that the transport is carrying.
 
the way I went around it was that when a unit fired the "unit is loaded ..." event, I saved that unit into unit group.
When unit leaves a transport, it fires the "unit enters region" event, so I used that. But the event fires for any unit (created, summoned, ...), hence I check if the triggering unit is in the "loaded" unit group. If yes, it was unloaded and I remove the unit from the unit group.

It doesn't fire the enters-region event unless you moved the unit outside the region after it was loaded. And yes, as KILLCIDE stated, use Unit Event. It does all that cool stuff without bugs.
 
Status
Not open for further replies.
Back
Top