- Joined
- Jun 27, 2010
- Messages
- 2,763
I have this triigger that is supposed to check every second, is a player in the region 'Hill' alone (there are no enemy players also inside of it).
and if so, score points for the player.
But it's not working and I have no idea what else to do to make it work.
and if so, score points for the player.
But it's not working and I have no idea what else to do to make it work.
-
KOTH Periodiic
-
Events
-
Time - Every 5.00 seconds of game time
-
-
Conditions
-
Actions
-
Set KOTH_Gr = (Units in Hill <gen> matching (((Owner of (Matching unit)) Not equal to Neutral Hostile) and ((Owner of (Matching unit)) Not equal to Neutral Passive)))
-
Unit Group - Pick every unit in KOTH_Gr and do (Actions)
-
Loop - Actions
-
Set TempPlayer = (Owner of (Picked unit))
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
Score_KOTHChecked[(Player number of TempPlayer)] Equal to False
-
-
Then - Actions
-
-------- ------------------------------------ --------
-
Set KOTHGrCheckFriends = (Units in Hill <gen> matching (((Owner of (Matching unit)) is an ally of TempPlayer) Equal to True))
-
Set KOTHGrCheckEnemies = (Units in Hill <gen> matching (((Owner of (Matching unit)) is an enemy of TempPlayer) Equal to True))
-
-------- ------------------------------------ --------
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
(Number of units in KOTHGrCheckEnemies) Equal to 0
-
-
Then - Actions
-
Set TempPlayer = (Owner of (Picked unit))
-
Set Score_KOTH[(Player number of TempPlayer)] = (Score_KOTH[(Player number of TempPlayer)] + 50)
-
Leaderboard - Change the value for TempPlayer in ExtraModeLeaderboard to Score_KOTH[(Player number of TempPlayer)]
-
Leaderboard - Sort ExtraModeLeaderboard by Value in Descending order
-
-------- ------------------------------------ --------
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
Score_KOTH[(Player number of TempPlayer)] Equal to 10000
-
-
Then - Actions
-
Player Group - Pick every player in (All allies of TempPlayer) and do (Actions)
-
Loop - Actions
-
Game - Victory (Picked player) (Show dialogs, Show scores)
-
-
-
Player Group - Pick every player in (All enemies of TempPlayer) and do (Actions)
-
Loop - Actions
-
Game - Defeat (Picked player) with the message: Defeat!
-
-
-
-
Else - Actions
-
-
-
Else - Actions
-
-
Set Score_KOTHChecked[(Player number of TempPlayer)] = True
-
-
Else - Actions
-
-
-
-
Player Group - Pick every player in (All players) and do (Actions)
-
Loop - Actions
-
Set Score_KOTHChecked[(Player number of TempPlayer)] = False
-
-
-
Custom script: call DestroyGroup(udg_KOTHGrCheckFriends)
-
Custom script: call DestroyGroup(udg_KOTHGrCheckEnemies)
-
Custom script: call DestroyGroup(udg_KOTH_Gr)
-
-