As far as I am concerned, this trigger should work. Basically, I'm testing it with the situation of an enemy controlled circle of power with one defender. When I enter the region, it will print "1, 2". Which makes sense. However, after it is done counting, and I re-enter the region it still prints the same answer instead of the one I would prefer. Any ideas?
Thanks for any help.
Code:
Azzuer T2
Events
Unit - A unit enters T02 <gen>
Conditions
Or - Any (Conditions) are true
Conditions
(Owner of (Entering unit)) Equal to Player 1 (Red)
(Owner of (Entering unit)) Equal to Player 2 (Blue)
(Owner of (Entering unit)) Equal to Player 3 (Teal)
(Owner of (Entering unit)) Equal to Player 4 (Purple)
(Owner of (Entering unit)) Equal to Player 5 (Yellow)
(Owner of (Entering unit)) Equal to Player 6 (Orange)
(Owner of (Entering unit)) Equal to Player 7 (Green)
(Owner of (Entering unit)) Equal to Player 8 (Pink)
Actions
Set EnmCounter = 0
Unit Group - Pick every unit in (Units within 750.00 of (Center of T02 <gen>)) and do (Actions)
Loop - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Owner of (Picked unit)) Equal to (Owner of Territory (Norm Territory) 0005 <gen>)
Then - Actions
Set EnmCounter = (EnmCounter + 1)
Game - Display to (All players) the text: (String(EnmCounter))
Else - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
EnmCounter Less than or equal to 1
Then - Actions
Unit - Change ownership of Territory (Norm Territory) 0005 <gen> to (Owner of (Entering unit)) and Change color
Else - Actions
Thanks for any help.