On my map, I have a dropship loaded with 8 individual terran units. The dropship cannot move due to a trigger that always moves the dropship to the location I set, however it can still unload.
I have trigger set when a unit is unloaded, and has accumulated 50 gas, it exchanges the 50 gas for 50 ore (Subtract 50 gas, Add 50 ore), Then the unit is reloaded.
My problem is, instead of subtracting 50 gas and adding 50 ore, it subtracts the total gas by all possible amounts divisible by 50 gas of the total, and the same with the ore (except adding).
(ex. Gas = 854 ... Ore = 0 *Unloads unit* Gas = 4 ... Ore = 850 *Unit Reloads* *end*)
(What I want. Gas = 854 ... Ore = 0 *Unloads unit* Gas = 804 ... Ore = 50 *Unit Reloads* *end*)
Any help please?
None.
It takes more than 1 trigger cycle for a unit to be reloaded into a transport. Here's what you could use:
Let loc be the ground location under the transport...
Conditions:
Player brings at least 1 unit to loc
Switch 1 is cleared
Actions:
Set switch 1
Subtract 50 minerals
Add 50 gas
Run AI Script "Enter transport" at loc
Preserve trigger
Conditions:
Player brings exactly 0 unit to loc
Switch 1 is set
Actions:
Clear switch 1
Preserve trigger
None.
TY very much, it worked perfectly
None.