I have attached a map that contains a trigger that gives points to players.
Essentially, players gain points every second, as long as they control a certain type of structure. I am not sure how to make the trigger end the game, as soon as the first player reaches 100 points. When that happens, that player shall get a victory-screen and the other players shall get a defeated-screen.
Additionally, I am trying to make the game send out a warning to players. For example, "Player A only needs 25 more points to win!" or something like that, when players are reaching 50 or 75 points.
This is an open source project I made quite some time ago, that may work for you. Feel free to improve it in any way you'd like, as it is rather bare-bone.
A very simple trigger that runs once every seconds could simply pick eatch players that control the famous structure and add the point to those players. You would need a variable with an array of dimension 1. First array could be the player number and the second the amount of point. Then every seconds you add a point to those player and check if they reached a certain amount. Then you do whatever you want. In this case you want it to end game in victory for the player that reaches 100 and in defeat for all other players. There might be a simpler version of it, i did not test if it would work by simply calling victory for that player and then defeat for all players would work (excluding the winning player because it already won..?) But since I guess it would not works like that, I felt like using a Player Group variable, adding everyone to it, removing the picked player and just end game for those that are in the variable in defeat and in victory for the player alone.
That a look at this trigger. You could run it once at Map initiation, or add that to the events.. whatever.
I have attached a map that contains a trigger that gives points to players.
Essentially, players gain points every second, as long as they control a certain type of structure. I am not sure how to make the trigger end the game, as soon as the first player reaches 100 points. When that happens, that player shall get a victory-screen and the other players shall get a defeated-screen.
Additionally, I am trying to make the game send out a warning to players. For example, "Player A only needs 25 more points to win!" or something like that, when players are reaching 50 or 75 points.
Would anyone mind to give me a helping hand?
Edit: Seems like maps can not be attached in forum posts anymore? I uploaded the map via filedropper instead: http://www.filedropper.com/triggerforpoints_1
https://www.sc2mapster.com/projects/tower-control-custom-melee
This is an open source project I made quite some time ago, that may work for you. Feel free to improve it in any way you'd like, as it is rather bare-bone.
Skype: [email protected] Current Project: Custom Hero Arena! US: battlenet:://starcraft/map/1/263274 EU: battlenet:://starcraft/map/2/186418
A very simple trigger that runs once every seconds could simply pick eatch players that control the famous structure and add the point to those players. You would need a variable with an array of dimension 1. First array could be the player number and the second the amount of point. Then every seconds you add a point to those player and check if they reached a certain amount. Then you do whatever you want. In this case you want it to end game in victory for the player that reaches 100 and in defeat for all other players. There might be a simpler version of it, i did not test if it would work by simply calling victory for that player and then defeat for all players would work (excluding the winning player because it already won..?) But since I guess it would not works like that, I felt like using a Player Group variable, adding everyone to it, removing the picked player and just end game for those that are in the variable in defeat and in victory for the player alone.
That a look at this trigger. You could run it once at Map initiation, or add that to the events.. whatever.
http://img11.hostingpics.net/pics/493593Sanstitre.png
Good luck
Working on projects: