• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

Need help with zone control

Status
Not open for further replies.
Level 2
Joined
Jun 3, 2010
Messages
10
Couldnt find it when searching so making new thread. The idea is when a unit enters a region they will get x score every y seconds(even if they leave the area), but if an enemy unit enters they take over the region and they will get score instead of the other team(region cant be captured if the first team is still there). Would also be nice if anyone could help with a working leaderboard for it.
 

Attachments

  • hero arena.jpg
    hero arena.jpg
    102.9 KB · Views: 95
Level 3
Joined
Jun 9, 2010
Messages
59
maybe you could add some sort of circle of power in the region that changes ownership to the team near it (in the region) that way you can keep track of which team gets what score and who owns the area easier yet you could still keep track of who gets the score even if they left the spot by the circle of powers team color (since regions cant really change control and are unoticable in-game) and in order to make sure the region is still owned by a player/team as long as they are still in the region while fighting is to run simple condition checks to see that when none of this owning players units are in the region, while this owning players units are in the region then it will change control...

as for who gets the score just make an integer variable for each team and whoever owns the region/circle of power gets lets say.. +1 every second then you could set the spot on your leaderboard or multi-board equal to the variable you just made.
ex:

  • Events:
  • Unit - a unit enters region x(your named region)
  • Conditions:
  • (Owner of (Entering unit)) Equal to Player 2(Blue) and (Region x contains (opposite team hero you define) Equal to false
  • Actions:
  • Unit - Change owner-ship of circle of power to Player 2(Blue) and change color
  • Events:
  • Unit - changes owner (note that youd want this to be a specific unit event for the circle of power)
  • Conditions:
  • (Owner of (Owner-ship changed unit)) Equal to Player 2(Blue)
  • Actions:
  • Set Owner = 2
  • Events:
  • Time - Every 1 seconds of game time
  • Conditions:
  • Owner is equal to 2
  • Actions:
  • Set Owner = (BlueTeamScore + 1)
Then you would do this trigger for say player red instead and then youd just change the variables so that if the ownership was changed to red then youd want variable owner to be equal to 1 and if that was equal to 1 then every second of he game add 1 to variable RedTeamScore + 1.... so basically do the same steps just name different the different team/player your changing to and variable amounts.

does this help?
 
Last edited:
Level 3
Joined
Jun 9, 2010
Messages
59
This would be a contest scenario type trigger:
  • Events:
  • Unit - a unit enters region x(your named region)
  • Conditions:
  • (Owner of (Entering unit)) Equal to Player 2(Blue) and (Region x contains (opposite team hero you define) Equal to false
  • Actions:
  • Unit - Change owner-ship of circle of power to Player 2(Blue) and change color
This trigger will check to see if the other player is on the hill and if they are not on the hill it procedes...
 
Last edited:
Level 2
Joined
Jun 3, 2010
Messages
10
I think this will be great, but there is 2 teams with 4 or 5 players each(havnt decided yet) so will it work if I change the (player blue) to (ally of player blue)? Will that work for blues team and for blue himself?
 
Level 3
Joined
Jun 9, 2010
Messages
59
I think this will be great, but there is 2 teams with 4 or 5 players each(havnt decided yet) so will it work if I change the (player blue) to (ally of player blue)? Will that work for blues team and for blue himself?

Yea it will work if its set to ally of player blue but you will also have to specifiy blue as well then since its only doing this for allies of player blue
 
Level 3
Joined
Jun 9, 2010
Messages
59
sorry for the double post but I forgot to mention something important youd need to change the condition to a and, multiple or an or, multiple depending on how your trigger works so that it will see if any of player blues allies are on the hill it will continue.

You could also make a varialbe like Enemy_On_Hill to tell if an enemy team member is on the hill make a trigger that sets Enemy_On_Hill = 1 so then you can run a condition check that says if ENemy_On_Hill is equal to 1 then dont change the ownership of hill over to team blue. This will be an easier way to check for enemy teams on the hill isntead of manuly seting a trigger that checks for each individual player on the hill.
 
Level 2
Joined
Jun 3, 2010
Messages
10
Im new on map making so have made 2 variables(with help :p) so couldnt figure out how to make the enemy_on_hill variable, could also need some help on the trigger for it. Tnx ;)
 
Level 3
Joined
Jun 9, 2010
Messages
59
Just have a When unit enters region(the hill region) event... condition would be like this: unit is equal to player blue or his allies, then set an action called set integer(your On_hill varibaly) to 2.

Now for the oppossite team do the same thing just have the On_Hill variable be set to 1 for player red and his allies (also changed in the condition).

I dont have time to write the proper trigger out tonight with all the fancy tages and what not so this is the general idea of what to do maybe ill throw something together tommarrow...
 
Status
Not open for further replies.
Top