In a map I'm working on, I want the player to have to kill four Zerg Hives...in order to win. But I can not figure out how to do this. As of now, the destruction of ANY of the four Hives will result in a victory for the player...but I want it to only give the player a victory if all four Hives have been destroyed.
its because you have all four hive in the events. events are treated like "or", if any one of them happens, it triggers. just make some conditions about whether the hives are still alive
The easiest way I've found to do this is as follows.
Firstly you need to make a variable in the trigger editor. Just right click on the left-hand side, scroll down to the "New ->" option and create a new variable.
It should automatically be an integer and you need to set the basic value to 4 by dodubleclicking the "Intial Value" option in the right-hand box. After that create a new trigger and make the event "Unit Dies". Double click the event and click the value button. Scroll down the list of possible units and select your first hive. Then hit ok and go to actions. Make a new action "Modify Variable" have it subtract one from the variable. Copy paste the whole trigger and make 3 extra copies each one for a different hive. After that make a new trigger with a "Periodic Event" and set it to every 1 second of game time This event could be anything that triggers when you want the player to achieve victory, any unit dies, for instance. (I say that because if you have it be every one second it wont let you play past victory...you'll see what i mean if you test this.) Then go to actions and create a new "If Then Else" action. Into the If box make a condition "Within Bounds" Change the value to the variable you made and for the bounds "0 <= "Variable _<= 0"
Then create a new "End Game" action in the "Then" box and it should be automatically set to Victory for player 1.
If you still need help send me a PM and ill try and help you out.
In a map I'm working on, I want the player to have to kill four Zerg Hives...in order to win. But I can not figure out how to do this. As of now, the destruction of ANY of the four Hives will result in a victory for the player...but I want it to only give the player a victory if all four Hives have been destroyed.
its because you have all four hive in the events. events are treated like "or", if any one of them happens, it triggers. just make some conditions about whether the hives are still alive
@Cobrafanglol: Go
The easiest way I've found to do this is as follows. Firstly you need to make a variable in the trigger editor. Just right click on the left-hand side, scroll down to the "New ->" option and create a new variable. It should automatically be an integer and you need to set the basic value to 4 by dodubleclicking the "Intial Value" option in the right-hand box. After that create a new trigger and make the event "Unit Dies". Double click the event and click the value button. Scroll down the list of possible units and select your first hive. Then hit ok and go to actions. Make a new action "Modify Variable" have it subtract one from the variable. Copy paste the whole trigger and make 3 extra copies each one for a different hive. After that make a new trigger with a "Periodic Event" and set it to every 1 second of game time This event could be anything that triggers when you want the player to achieve victory, any unit dies, for instance. (I say that because if you have it be every one second it wont let you play past victory...you'll see what i mean if you test this.) Then go to actions and create a new "If Then Else" action. Into the If box make a condition "Within Bounds" Change the value to the variable you made and for the bounds "0 <= "Variable _<= 0" Then create a new "End Game" action in the "Then" box and it should be automatically set to Victory for player 1.
If you still need help send me a PM and ill try and help you out.
Hi. I'm working on map that needs very simple victory / lose conditions.
I want that player 1 wins while player 2 and 3 control no buildings.
In Starcraft1 there was condition like "players controls 0 buildings -> Defeat"
Is there similiar thing anywhere? I don't want to use melee settings.
@Terhonator: Go
something like pick every unit whole map owned by player.
if number of units in unitgroup == 0 -> defeat
or just keep the meele win/defeat conditions
Problem is that when I defeat player 2 or 3 first it says "gg" or something like and it's not good thing on semi-serious custom map :)
Another problem: How to do those unit groups?