- Joined
- Aug 18, 2015
- Messages
- 183
Hi everyone!
To make a map of mine a little more interesting for advanced players, I try to add optional missions which work like achievements (for additionnal rewards, or fun).
For instance, I imagined a subsidiary quest for which the player must not lose more 200* minions. (It is the first time your hero works as a commander for his big boss's army and he doesn't want to disappoint).
*The number is not important in itself, it has to be rather big but, as I have not finished the map yet, I don't know for sure whether it's gonna be difficult, so I can always change it.
So, I found out how to actually count the lost units with a trigger, but I can't find how to display the number of remaining units to the player (as an indication).
I guess it has something to do with the "counter" thing and I tried to do something with timer windows but it didn't work...
I know it's possible since I have seen it quite a few times in various campaigns but I have no clue how to proceed
Anyway, here's the trigger I use to count the dead units:

PS: Sorry, it looks like there is an issue with how the trigger displays to you. I use the French version of the editor, that might be why :/
To make a map of mine a little more interesting for advanced players, I try to add optional missions which work like achievements (for additionnal rewards, or fun).
For instance, I imagined a subsidiary quest for which the player must not lose more 200* minions. (It is the first time your hero works as a commander for his big boss's army and he doesn't want to disappoint).
*The number is not important in itself, it has to be rather big but, as I have not finished the map yet, I don't know for sure whether it's gonna be difficult, so I can always change it.
So, I found out how to actually count the lost units with a trigger, but I can't find how to display the number of remaining units to the player (as an indication).
I guess it has something to do with the "counter" thing and I tried to do something with timer windows but it didn't work...
I know it's possible since I have seen it quite a few times in various campaigns but I have no clue how to proceed
Anyway, here's the trigger I use to count the dead units:
-
CompteMortsReprouves
-
Evénements
-
Unité - A unit owned by Joueur 2 (Bleu) Meurt
-
-
Conditions
-
Actions
-
Set ReelReprouvesMorts = (ReelReprouvesMorts + 1.00)
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
Si - Conditions
-
ReelReprouvesMorts Supérieur ou égal Ã* 200.00
-
-
Alors - Actions
-
Quête - Flash the quest dialog button
-
Quête - Mark QuetePremiereImpression as Raté
-
Quête - Display to (All players) the Quête ratée message: |cffffcc00Quête op...
-
-
Sinon - Actions
-
Do nothing
-
-
-
-

PS: Sorry, it looks like there is an issue with how the trigger displays to you. I use the French version of the editor, that might be why :/