Manix
Well-Known Member
- Reaction score
- 29
Code:
CaptureFlags1
Events
Unit - A unit enters Region 006 <gen>
Conditions
Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
((Triggering unit) has an item of type Leather Chest) Equal to True
Then - Actions
Set VillageCaptureUnit[1] = (Triggering unit)
Unit - Pause VillageCaptureUnit[1]
Countdown Timer - Start AssociateTimers[1] as a One-shot timer that will expire in 20.00 seconds
Countdown Timer - Create a timer window for AssociateTimers[1] with title Capturing:
Set AssociateTimersWindows[1] = (Last created timer window)
Trigger - Turn off (This trigger)
Else - Actions
Code:
CaptureFlags1Check
Events
Time - AssociateTimers[1] expires
Conditions
Actions
Countdown Timer - Destroy AssociateTimersWindows[1]
Set Village[1] = (Units within 200.00 of VillagePoint[1])
Unit Group - Pick every unit in Village[1] and do (Actions)
Loop - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Region 006 <gen> contains VillageCaptureUnit[1]) Equal to True
Then - Actions
Unit - Unpause VillageCaptureUnit[1]
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Owner of Circle of Power 0052 <gen>) Equal to Player 6 (Orange)
(VillageCaptureUnit[1] belongs to an ally of Player 5 (Yellow)) Equal to True
Then - Actions
Set AGoldGivenSyndicate = (AGoldGivenSyndicate - 1)
Set AGoldGivenAssociate = (AGoldGivenAssociate + 1)
Unit - Change ownership of Circle of Power 0052 <gen> to Player 5 (Yellow) and Change color
Else - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(VillageCaptureUnit[1] belongs to an ally of Player 5 (Yellow)) Equal to True
Then - Actions
Set AGoldGivenAssociate = (AGoldGivenAssociate + 1)
Unit - Change ownership of Circle of Power 0052 <gen> to Player 5 (Yellow) and Change color
Else - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Owner of Circle of Power 0052 <gen>) Equal to Player 5 (Yellow)
(VillageCaptureUnit[1] belongs to an ally of Player 6 (Orange)) Equal to True
Then - Actions
Set AGoldGivenSyndicate = (AGoldGivenSyndicate + 1)
Set AGoldGivenAssociate = (AGoldGivenAssociate - 1)
Unit - Change ownership of Circle of Power 0052 <gen> to Player 6 (Orange) and Change color
Else - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(VillageCaptureUnit[1] belongs to an ally of Player 6 (Orange)) Equal to True
Then - Actions
Set AGoldGivenSyndicate = (AGoldGivenSyndicate + 1)
Unit - Change ownership of Circle of Power 0052 <gen> to Player 6 (Orange) and Change color
Else - Actions
Else - Actions
Custom script: call DestroyGroup (udg_Village[1])
Wait 1.00 seconds
Trigger - Turn on CaptureFlags1 <gen>
I've set that VillagePoint[1] in an initialization trigger:
Code:
Set Village[1] = (Units within 200.00 of VillagePoint[1])