There is a function called Custom Value of Unit.
None.
Alright, so here is the trigger I set to remove the unit:
remove bunker
General - If (Conditions) then do multiple (Actions)
If Then Else
General - Else if (Conditions) then do (Actions)
Else If
(Custom value 1 of (Triggering unit)) == 1.0
Then
Variable - Set --Zone--[1] = 1
General - Else if (Conditions) then do (Actions)
Else If
(Custom value 1 of (Triggering unit)) == 2.0
Then
Variable - Set --Zone--[1] = 2
General - Else if (Conditions) then do (Actions)
Else If
(Custom value 1 of (Triggering unit)) == 3.0
Then
Variable - Set --Zone--[1] = 3
General - Else if (Conditions) then do (Actions)
Else If
(Custom value 1 of (Triggering unit)) == 4.0
Then
Variable - Set --Zone--[1] = 4
General - Else if (Conditions) then do (Actions)
Else If
(Custom value 1 of (Triggering unit)) == 5.0
Then
Variable - Set --Zone--[1] = 5
General - Else if (Conditions) then do (Actions)
Else If
(Custom value 2 of (Triggering unit)) == 1.0
Then
Variable - Set --Zone--[2] = 1
General - Else if (Conditions) then do (Actions)
Else If
(Custom value 2 of (Triggering unit)) == 2.0
Then
Variable - Set --Zone--[2] = 2
General - Else if (Conditions) then do (Actions)
Else If
(Custom value 2 of (Triggering unit)) == 3.0
Then
Variable - Set --Zone--[2] = 3
General - Else if (Conditions) then do (Actions)
Else If
(Custom value 2 of (Triggering unit)) == 4.0
Then
Variable - Set --Zone--[2] = 4
General - Else if (Conditions) then do (Actions)
Else If
(Custom value 2 of (Triggering unit)) == 5.0
Then
Variable - Set --Zone--[2] = 5
------- Set Zone Owner to 0
Variable - Set Zone Owner[--Zone--[1]][--Zone--[2]] = 0
The trigger works to set the color if there is a bunker in the area, but it doesn't change it back if there isn't a bunker in the area. Also, ever since I added these triggers the game experiences extreme lag because of how often it runs the 21 "any unit enters region" triggers. Is there a way I could fix this?
None.
I would have to see all the triggers together. As for the lag you could add conditions to the triggers to keep them from firing as often, not sure exactly what you should add without knowing when you need to change the button colour and when you don't under the event.
None.