I need some help. I am making movie map where the 2 hero players, have to kill so many zerglings (say 30), and then a gate opens and they move on. Problem: how do i do it so when said heroes kill those 30 zerglings the gate opens? like is there a way to keep track of the kills they get? Or is it possible to do it where player 15 has no units in this region open the door, and if so how do i go about doing this or something like it? Thanks
make a variable called say HeroKills,
Trigger
Event: any unit dies
Condtion:
owner of dying unit == enemy player
owner of killing unit != enemy player
actions:
if owner of the killing unit == 1:
then modify variable(HeroKills[1] + 1
else
modify variable [HeroKills[2] + 1
hope you could understand that i dont really know a neat way to do this lol
Also, if it's just zerglings they're killing, and they don't have any other kills, you can add Unit Property > Kills for each unit. You don't have to create a variable in this case. If they already have kills you can either use a variable or reset each unit's kills to zero before engaging the zerglings.
I need some help. I am making movie map where the 2 hero players, have to kill so many zerglings (say 30), and then a gate opens and they move on. Problem: how do i do it so when said heroes kill those 30 zerglings the gate opens? like is there a way to keep track of the kills they get? Or is it possible to do it where player 15 has no units in this region open the door, and if so how do i go about doing this or something like it? Thanks
make a variable called say HeroKills, Trigger Event: any unit dies Condtion: owner of dying unit == enemy player owner of killing unit != enemy player actions: if owner of the killing unit == 1: then modify variable(HeroKills[1] + 1 else modify variable [HeroKills[2] + 1 hope you could understand that i dont really know a neat way to do this lol
@TheTAZsc: Go
But how do I get the door to open after killing 15 of the zerglings?
when the variable = the desired amount of kills either remove the door or figure out how to lower it, i have no idea about opening and closing things,
Issue a non-targeted order to the door to Open.
Also, if it's just zerglings they're killing, and they don't have any other kills, you can add Unit Property > Kills for each unit. You don't have to create a variable in this case. If they already have kills you can either use a variable or reset each unit's kills to zero before engaging the zerglings.
@netherdragon: Go
You could also use unit groups to check for living units left in the group after a ling dies.