• 🏆 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!

Control-Point System?

Status
Not open for further replies.
Level 3
Joined
Mar 17, 2011
Messages
34
Hey. I am currently having problems with making a system for Control-points in my map.

It's a 12 player map, where each player gains income based on the amount of control points they have under their control.

However the systems that are on hiveworkshop I simply don't understand.
I must be an idiot or something, but yeah.

My trigger for CAPTURING the points is as follows:

  • Events
    • Unit - A unit is attacked
  • Conditions
  • Actions
    • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      • If - Conditions
        • (Unit-type of (Attacked unit)) Equal to Control Point
      • Then - Actions
        • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
          • If - Conditions
            • (Percentage life of (Attacked unit)) Less than or equal to 15.00
          • Then - Actions
            • Unit - Set life of (Attacked unit) to (Max life of (Attacked unit))
            • Unit - Change ownership of (Attacked unit) to (Owner of (Attacking unit)) and Change color
          • Else - Actions
            • Do Nothing
      • Else - Actions
        • Do Nothing
Could someone please help me with implementing the next trigger for income of about 40g/minute for each control point, and if possible I am going to make a multiboard showing control points owned by each player.

Thanks.
 
Last edited by a moderator:
Level 37
Joined
Mar 6, 2006
Messages
9,240
Set the control points into a unit group:
  • Untitled Trigger 019
    • Events
      • Map initialization
    • Conditions
    • Actions
      • Set group = (Units in (Playable map area) matching ((Unit-type of (Matching unit)) Equal to Control Point))
Use a periodic trigger to add gold for owner of the control point:
  • Untitled Trigger 020
    • Events
      • Time - Every 60.00 seconds of game time
    • Conditions
    • Actions
      • Unit Group - Pick every unit in group and do (Actions)
        • Loop - Actions
          • Player - Add 40 to (Owner of (Picked unit)) Current gold
 
Level 3
Joined
Mar 17, 2011
Messages
34
Thank you all very much for your help. Now I just need to figure out how to get the Control points to work in a multiboard...Which is proving more of a problem than my original question:ogre_rage:
 
Last edited:
Status
Not open for further replies.
Top