When a player from team 1 (player number <= 3) enters range (4) of a specified building, then start time for 15 seconds, at timer expire grant control of that building to player 14.
If the player leaves the range of that structure before timer expires, then cancel the capture.
If an enemy player (4-6) enters the range of the structure during the capture, cancel the capture.
What I have so far is the first part, where player 1 runs near the structure, it starts the timer, at the end of the timer player 14 gets control. If player 1 leaves the range of the structure, it cancels the timer and there is no capture.
What I don't know how to do is make it so any player from team 1 can initiate the capture without making a trigger for each player. Also, I think a problem I will run into is that if 2 players on the same team attempt to capture the structure, and one of them leaves during the capture, I think that will cancel the capture. Obviously that's not what I want.
And then I need a trigger for any player on team 2 entering the region, cancel the capture, or initiate capture for team 2 if no team 1 players present.
Ok, I did this exact thing with my map. You need 2 global variables:
1- building owner (int)
2- building time (int)
make a trigger and 2 local variables:
-Team A occupies (int)
- Team B occupies (int)
-note.. team 1 has to be allies with one computer, same with team 2. So all players on team, for example, are ally with player 14, all people on player 15 might be ally with p 15.
actions-
if # of living units in region (area around your building ) having alliance ally with player 14 >= 1
then Team A occupies = 1
else Team A occupies = 0
if # of living units in region (area around your building ) having alliance ally with player 15 >= 1
then Team B occupies = 1
else Team B occupies = 0
if: team A occupies == 1
team B occupies == 0
building seconds >= 3
then: (give building to team A, do whatever you want here BUT remember it happens every 5 seconds when this trigger is run. so dont have a ping or message or anything.)
[repeat last if/then but for team B]
if - Team A occupies == 1
team b occupies == 0
modify: building seconds + 1
[repeat last if/then but for team B]
if - Team A occupies == 1
team b occupies == 1
building seconds = 0
if - Team A occupies == 0
team b occupies == 0
building seconds = 0
Thats it! Let me know if you have any issue with a PM, I might not check this thread again.
Rollback Post to RevisionRollBack
Feel free to Send me a PM if you have any questions/concerns!
To post a comment, please login or register a new account.
Here is what I'm trying to do:
When a player from team 1 (player number <= 3) enters range (4) of a specified building, then start time for 15 seconds, at timer expire grant control of that building to player 14.
If the player leaves the range of that structure before timer expires, then cancel the capture.
If an enemy player (4-6) enters the range of the structure during the capture, cancel the capture.
What I have so far is the first part, where player 1 runs near the structure, it starts the timer, at the end of the timer player 14 gets control. If player 1 leaves the range of the structure, it cancels the timer and there is no capture.
What I don't know how to do is make it so any player from team 1 can initiate the capture without making a trigger for each player. Also, I think a problem I will run into is that if 2 players on the same team attempt to capture the structure, and one of them leaves during the capture, I think that will cancel the capture. Obviously that's not what I want.
And then I need a trigger for any player on team 2 entering the region, cancel the capture, or initiate capture for team 2 if no team 1 players present.
Appreciate any help, thanks a lot!
Ok, I did this exact thing with my map. You need 2 global variables:
1- building owner (int)
2- building time (int)
make a trigger and 2 local variables: -Team A occupies (int) - Team B occupies (int)
-note.. team 1 has to be allies with one computer, same with team 2. So all players on team, for example, are ally with player 14, all people on player 15 might be ally with p 15.
actions-
if # of living units in region (area around your building ) having alliance ally with player 14 >= 1
then Team A occupies = 1
else Team A occupies = 0
if # of living units in region (area around your building ) having alliance ally with player 15 >= 1
then Team B occupies = 1
else Team B occupies = 0
if: team A occupies == 1
team B occupies == 0
building seconds >= 3
then: (give building to team A, do whatever you want here BUT remember it happens every 5 seconds when this trigger is run. so dont have a ping or message or anything.)
[repeat last if/then but for team B]
if - Team A occupies == 1
team b occupies == 0
modify: building seconds + 1
[repeat last if/then but for team B]
if - Team A occupies == 1
team b occupies == 1
building seconds = 0
if - Team A occupies == 0
team b occupies == 0
building seconds = 0
Thats it! Let me know if you have any issue with a PM, I might not check this thread again.