- Joined
- Apr 22, 2020
- Messages
- 53
I tried to manage myself on this but it's really harder than I thought.
It's a map for 1v1 or 2v2 or 3v3. You lose when you have no more units.
(Except 1 invulnerable and the starting point, so you lose when you have 2 units left)
I achieve to make a Defeat trigger :
But I don't know how I can make a working trigger for winning, including number of allies...
I tried to copy a solution found in a thread... but I have to admit I don't understand the half of it...
I've try to adapt it to my map, so there must be some mistakes...
It's a map for 1v1 or 2v2 or 3v3. You lose when you have no more units.
(Except 1 invulnerable and the starting point, so you lose when you have 2 units left)
I achieve to make a Defeat trigger :
But I don't know how I can make a working trigger for winning, including number of allies...
I tried to copy a solution found in a thread... but I have to admit I don't understand the half of it...
-
WinLose Initialisation
-
Evénements
-
Conditions
-
Actions
-
Set WinLose_Index = 1
-
For each (Integer A) from 1 to 10, do (Actions)
-
Boucle - Actions
-
Groupe joueur - Add (Player((Integer A))) to WinLose_PlayerGroup[WinLose_Index]
-
Set WinLose_TeamNumber[(Integer A)] = WinLose_Index
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
Si - Conditions
-
((Integer A) mod 3) Egal à 0
-
-
Alors - Actions
-
Set WinLose_Index = (WinLose_Index + 1)
-
-
Sinon - Actions
-
-
-
-
-
-
Simple Defeat Loop
-
Evénements
-
Unité - A unit Meurt
-
-
Conditions
-
(Number of units in (Units owned by (Owner of (Triggering unit)))) Egal à 2
-
-
Actions
-
Set WinLose_Player = (Owner of (Triggering unit))
-
For each (Integer WinLose_Index) from 1 to 2, do (Actions)
-
Boucle - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
Si - Conditions
-
WinLose_TeamNumber[(Player number of WinLose_Player)] Egal à WinLose_Index
-
-
Alors - Actions
-
Set WinLose_TeamDefeatedCount[WinLose_Index] = (WinLose_TeamDefeatedCount[WinLose_Index] + 1)
-
-
Sinon - Actions
-
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
Si - Conditions
-
WinLose_TeamDefeatedCount[WinLose_Index] Egal à 3
-
-
Alors - Actions
-
For each (Integer A) from 1 to 10, do (Actions)
-
Boucle - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
Si - Conditions
-
WinLose_TeamNumber[(Integer A)] Egal à WinLose_Index
-
-
Alors - Actions
-
Set WinLose_Player = (Player((Integer A)))
-
Partie - Display to (All players) the text: ((Name of WinLose_Player) + was defeated!)
-
Partie - Defeat WinLose_Player with the message: Defeat!
-
Set WinLose_TotalDefeated = (WinLose_TotalDefeated + 1)
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
Si - Conditions
-
WinLose_TotalDefeated Egal à 3
-
-
Alors - Actions
-
Déclencheur - Run Simple Victory Check <gen> (checking conditions)
-
-
Sinon - Actions
-
-
-
Sinon - Actions
-
-
-
-
-
Sinon - Actions
-
-
-
-
-
-
Simple Victory Check
-
Evénements
-
Conditions
-
Actions
-
For each (Integer A) from 1 to 10, do (Actions)
-
Boucle - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
Si - Conditions
-
(Number of units in (Units owned by (Player((Integer A))))) Supérieur à 2
-
-
Alors - Actions
-
Partie - Display to (All players) the text: ((Name of (Player((Integer A)))) + won!)
-
Partie - Victory (Player((Integer A))) (Montrer dialogs, Montrer scores)
-
Set WinLose_Index = (WinLose_Index + 1)
-
-
Sinon - Actions
-
-
-
-
-
I've try to adapt it to my map, so there must be some mistakes...
Last edited: