• 🏆 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!
  • 🏆 Hive's 6th HD Modeling Contest: Mechanical is now open! Design and model a mechanical creature, mechanized animal, a futuristic robotic being, or anything else your imagination can tinker with! 📅 Submissions close on June 30, 2024. Don't miss this opportunity to let your creativity shine! Enter now and show us your mechanical masterpiece! 🔗 Click here to enter!

Income issue (giving income based on buildings)

Status
Not open for further replies.
Level 2
Joined
Dec 31, 2008
Messages
7
Okay, i cant figure out how to supply income depending on the number of certain buldings a player has. Could somone tell me how?
 
Level 23
Joined
Oct 12, 2008
Messages
1,783
Basically set the players income as a variable.

You then set the variable to an amount based on the number of buildings the players has.
  • Income
    • Events
      • Time - Every 5.00 seconds of game time
    • Conditions
    • Actions
      • Player Group - Pick every player in Team1 and do (Actions)
        • Loop - Actions
          • Player - Add (5 x (Number of units in StructureGroup1)) to (Picked player) Current gold
      • Player Group - Pick every player in Team2 and do (Actions)
        • Loop - Actions
          • Player - Add (5 x (Number of units in StructureGroup2)) to (Picked player) Current gold
StructureGroup is a unit group that holds all strucutres.
 
Status
Not open for further replies.
Top