I'm trying to set up a king of the hill style map, 1v1, where a player can put units atop a hill and gains minerals per 5 seconds. If an enemy unit/s enters the region then neither player gets the minerals or if either player is in receipt of the minerals and leaves the region they stop as well. I've got the trigger to work to give player 1 the minerals but not to recognize if an enemy unit enters. I've looked through most of the forum posts I could find relating to this. I tried this : http://www.starcraft2.sc2mapster.com/forums/development/triggers/31763-help-with-king-of-the-hill-trigger/ . But it refused to acknowledge either unit entering or leaving the region nor did it seem to specify that if an enemy unit entered to stop the trigger.
I was facing the same problem like few weeks ago. I made you an example map to help you clarify my point of view.
First of all, don't use the enter/exit region events. Why? Easy, it is simply because you will need to face many problems like if an unit dies in the region, etc. As you can see in my map, I use a while loop that checks every 3 seconds if they are units inside my region (units of the specified player). Once it is done, I verify if they are unit of another player inside the region and if there is only one player that hold unit in the region, I verify if this player is still active (which is very important, you don't want to make win a player who has quit) and after that I give him the mineral.
For example, at 30 seconds of the beginning of the game, I create an enemy zergling inside the region. As you will see, you will not have your resource until you kill it, but if you let it alive, you will not lose the game.
For aesthetical reason I used a building with a 'radar' zone to help the player to limit the zone to capture. If you destroy the building, it will automatically stop all triggers (which can be very interesting in a 1V1 map). When you'll get 120 minerals, you will automatically win the game.
Little suggestion : you should change the name of this thread to add key words like king of the hill or KOTH, so if other players want to see your problem, it will be easier for them to help you.
Trying to edit what you've done to suit what im trying to do, dropped the enter region plan as per your instructions, decided instead to place a Xel'Naga Tower in the center instead. So what I want to do is if the tower is activated then the activating player gets the minerals, and so on.
I'm trying to set up a king of the hill style map, 1v1, where a player can put units atop a hill and gains minerals per 5 seconds. If an enemy unit/s enters the region then neither player gets the minerals or if either player is in receipt of the minerals and leaves the region they stop as well. I've got the trigger to work to give player 1 the minerals but not to recognize if an enemy unit enters. I've looked through most of the forum posts I could find relating to this. I tried this : http://www.starcraft2.sc2mapster.com/forums/development/triggers/31763-help-with-king-of-the-hill-trigger/ . But it refused to acknowledge either unit entering or leaving the region nor did it seem to specify that if an enemy unit entered to stop the trigger.
Any help will be greatly appreciated
Thanks in advance
I was facing the same problem like few weeks ago. I made you an example map to help you clarify my point of view.
First of all, don't use the enter/exit region events. Why? Easy, it is simply because you will need to face many problems like if an unit dies in the region, etc. As you can see in my map, I use a while loop that checks every 3 seconds if they are units inside my region (units of the specified player). Once it is done, I verify if they are unit of another player inside the region and if there is only one player that hold unit in the region, I verify if this player is still active (which is very important, you don't want to make win a player who has quit) and after that I give him the mineral.
For example, at 30 seconds of the beginning of the game, I create an enemy zergling inside the region. As you will see, you will not have your resource until you kill it, but if you let it alive, you will not lose the game.
For aesthetical reason I used a building with a 'radar' zone to help the player to limit the zone to capture. If you destroy the building, it will automatically stop all triggers (which can be very interesting in a 1V1 map). When you'll get 120 minerals, you will automatically win the game.
Little suggestion : you should change the name of this thread to add key words like king of the hill or KOTH, so if other players want to see your problem, it will be easier for them to help you.
@tatatatate: Go
Trying to edit what you've done to suit what im trying to do, dropped the enter region plan as per your instructions, decided instead to place a Xel'Naga Tower in the center instead. So what I want to do is if the tower is activated then the activating player gets the minerals, and so on.
I modified the map so you can check how I've done that.
@tatatatate: Go
Thanks when I get up in the morning I'll go through it and see whats what :)
No problem man!