Hi there,
I'm working on a custom map where multiple 1 v 1 duels are fought at the same time. Most of the game functions well, except for one thing.
I have a trigger that ends a round:
Also, if anyone has a better way to trigger this trigger than to have it trigger by the kill event, please let me know.
Thanks!
I'm working on a custom map where multiple 1 v 1 duels are fought at the same time. Most of the game functions well, except for one thing.
I have a trigger that ends a round:
-
S1 Kill Trigger
-

Events
-


Unit - A unit Dies
-
-

Conditions
-

Actions
-


Set VariableSet TempMatch = 0
-


Set VariableSet TempPN = 0
-


Set VariableSet TempOwnernumber = (Player number of (Owner of (Triggering unit)))
-


-------- combat unit 9-16 --------
-


If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-



If - Conditions
-




TempOwnernumber Greater than or equal to 9
-




TempOwnernumber Less than or equal to 16
-
-



Then - Actions
-




Set VariableSet TempPN = (TempOwnernumber - 8)
-




Set VariableSet TempMatch = Player_MatchIndex[TempPN]
-
-



Else - Actions
-




Do nothing
-
-
-


-------- ghost combat unit P19 --------
-


If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-



If - Conditions
-




TempOwnernumber Equal to 19
-
-



Then - Actions
-




Set VariableSet TempMatch = GhostTargetMatchIndex
-
-



Else - Actions
-




Do nothing
-
-
-


-------- alleen doorgaan als deze unit bij een actieve match hoort --------
-


If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-



If - Conditions
-




TempMatch Greater than or equal to 1
-




TempMatch Less than or equal to 4
-




ArenaResolved[TempMatch] Equal to False
-
-



Then - Actions
-




-------- side a unit died --------
-




If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-





If - Conditions
-






TempPN Equal to ArenaSideAPlayer[TempMatch]
-
-





Then - Actions
-






Set VariableSet TempGroup = (Units in MatchRegion[TempMatch] matching ((((Matching unit) is alive) Equal to True) and ((Owner of (Matching unit)) Equal to (Player(TempOwnernumber)))))
-






If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-







If - Conditions
-








(Number of units in TempGroup) Equal to 0
-
-







Then - Actions
-








Set VariableSet ArenaWinner[TempMatch] = ArenaSideBPlayer[TempMatch]
-








Set VariableSet ArenaLoser[TempMatch] = ArenaSideAPlayer[TempMatch]
-








Set VariableSet ArenaResolved[TempMatch] = True
-








Set VariableSet ResolvedMatchCount = (ResolvedMatchCount + 1)
-








Trigger - Run S1B Match Resolved <gen> (checking conditions)
-
-







Else - Actions
-








Do nothing
-
-
-






Custom script: call DestroyGroup(udg_TempGroup)
-
-





Else - Actions
-






Do nothing
-
-
-




-------- side b player unit died --------
-




If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-





If - Conditions
-






ArenaResolved[TempMatch] Equal to False
-






TempPN Equal to ArenaSideBPlayer[TempMatch]
-






ArenaSideBIsGhost[TempMatch] Equal to False
-
-





Then - Actions
-






Set VariableSet TempGroup = (Units in MatchRegion[TempMatch] matching ((((Matching unit) is alive) Equal to True) and ((Owner of (Matching unit)) Equal to (Player(TempOwnernumber)))))
-






If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-







If - Conditions
-








(Number of units in TempGroup) Equal to 0
-
-







Then - Actions
-








Set VariableSet ArenaWinner[TempMatch] = ArenaSideAPlayer[TempMatch]
-








Set VariableSet ArenaLoser[TempMatch] = ArenaSideBPlayer[TempMatch]
-








Set VariableSet ArenaResolved[TempMatch] = True
-








Set VariableSet ResolvedMatchCount = (ResolvedMatchCount + 1)
-








Trigger - Run S1B Match Resolved <gen> (checking conditions)
-
-







Else - Actions
-
-






Custom script: call DestroyGroup(udg_TempGroup)
-
-





Else - Actions
-






Do nothing
-
-
-




-------- side b ghost unit died --------
-




If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-





If - Conditions
-






ArenaResolved[TempMatch] Equal to False
-






TempOwnernumber Equal to 19
-






ArenaSideBIsGhost[TempMatch] Equal to True
-
-





Then - Actions
-






Set VariableSet TempGroup = (Units in MatchRegion[TempMatch] matching ((((Matching unit) is alive) Equal to True) and ((Owner of (Matching unit)) Equal to Player 19 (Mint))))
-






If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-







If - Conditions
-








(Number of units in TempGroup) Equal to 0
-
-







Then - Actions
-








Set VariableSet ArenaWinner[TempMatch] = ArenaSideAPlayer[TempMatch]
-








Set VariableSet ArenaLoser[TempMatch] = 0
-








Set VariableSet ArenaResolved[TempMatch] = True
-








Set VariableSet ResolvedMatchCount = (ResolvedMatchCount + 1)
-








Trigger - Run S1B Match Resolved <gen> (checking conditions)
-
-







Else - Actions
-
-






Custom script: call DestroyGroup(udg_TempGroup)
-
-





Else - Actions
-






Do nothing
-
-
-
-



Else - Actions
-




Do nothing
-
-
-
-
Also, if anyone has a better way to trigger this trigger than to have it trigger by the kill event, please let me know.
Thanks!