• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

Request Income System

Status
Not open for further replies.
Level 5
Joined
Sep 27, 2008
Messages
147
hi i am troynl and i am building a map called Orcs vs Humans Legends begins.
I am nearly finnished but i still got 1 problem
I got no income system, I realy want the control points like in Dark Ages of Warcraft.
i don't know how to make that :cry:
can some1 help me? Thanks

Troynl
 
Level 3
Joined
Feb 2, 2009
Messages
42
You can use something like this :) (just to get you starting)

Where Variable A = Entering unit teams current income
and variable B = Previous owner teams current income

so when a unit owned by team 1 (A) Enters the Circle of Power, their income raises by one (or some other number you choose) and the team that owned the Circle of Power before gets lower Income by the variuable Set B = (B - 1)


  • Untitled Trigger 001
    • Events
      • Unit - A unit enters Circle of Power
    • Conditions
      • (Entering unit equals to (Someone on team 1)) or (Entering unit equals to (Someone on team 2))
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • Entering unit equals to (Someone on team 1)
        • Then - Actions
          • Unit - Change ownership of (Circle of Power) to (Owner of (Entering unit)) and Change color
          • Set A = (A + 1)
          • Set B = (B - 1)
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • Entering unit equals to (Someone on team 2)
        • Then - Actions
          • Unit - Change ownership of (Circle of Power) to (Owner of (Entering unit)) and Change color
          • Set A = (A - 1)
          • Set B = (B + 1)
        • Else - Actions
 
Level 3
Joined
Feb 2, 2009
Messages
42
you need some customization of it tho :S
sweet ;)
i can make it better... just wait a bit and i will post it :)
i need to know how many players are on each team?!
 
Level 3
Joined
Feb 2, 2009
Messages
42
Here is a quite good code :D
just finished it, and tested it, it works good :D

Init triggers:

Thisone is basic
  • Melee Initialization
    • Events
      • Map initialization
    • Conditions
    • Actions
      • Set Income_Team1 = 50
      • Set Income_Team2 = 50
      • Player Group - Add Player 1 (Red) to Team_1
      • Player Group - Add Player 2 (Blue) to Team_1
      • Player Group - Add Player 3 (Teal) to Team_1
      • Player Group - Add Player 4 (Purple) to Team_1
      • Player Group - Add Player 5 (Yellow) to Team_2
      • Player Group - Add Player 6 (Orange) to Team_2
      • Player Group - Add Player 7 (Green) to Team_2
      • Player Group - Add Player 8 (Pink) to Team_2
      • Visibility - Disable fog of war
      • Visibility - Disable black mask

Thisone takes hand of income
  • Income
    • Events
      • Time - Income_Timer expires
    • Conditions
    • Actions
      • -------- Team 1 --------
      • Player - Set Player 1 (Red) Current gold to ((Player 1 (Red) Current gold) + Income_Team1)
      • Player - Set Player 2 (Blue) Current gold to ((Player 2 (Blue) Current gold) + Income_Team1)
      • Player - Set Player 3 (Teal) Current gold to ((Player 3 (Teal) Current gold) + Income_Team1)
      • Player - Set Player 4 (Purple) Current gold to ((Player 4 (Purple) Current gold) + Income_Team1)
      • -------- Team 2 --------
      • Player - Set Player 5 (Yellow) Current gold to ((Player 5 (Yellow) Current gold) + Income_Team2)
      • Player - Set Player 6 (Orange) Current gold to ((Player 6 (Orange) Current gold) + Income_Team2)
      • Player - Set Player 7 (Green) Current gold to ((Player 7 (Green) Current gold) + Income_Team2)
      • Player - Set Player 8 (Pink) Current gold to ((Player 8 (Pink) Current gold) + Income_Team2)

New folder - controles "overtaking" of areas:

Thisone controles the Coral Bed
  • Coral Bed
    • Events
      • Unit - A unit enters Coreal Bed <gen>
    • Conditions
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Owner of (Entering unit)) Not equal to (Owner of Control area 0000 <gen>)
          • Or - Any (Conditions) are true
            • Conditions
              • (Owner of (Entering unit)) Equal to Player 1 (Red)
              • (Owner of (Entering unit)) Equal to Player 2 (Blue)
              • (Owner of (Entering unit)) Equal to Player 3 (Teal)
              • (Owner of (Entering unit)) Equal to Player 4 (Purple)
        • Then - Actions
          • Unit - Change ownership of Control area 0000 <gen> to Player 1 (Red) and Change color
          • Set Income_Team1 = (Income_Team1 + 15)
          • Set Income_Team2 = (Income_Team2 - 15)
          • Game - Display to (All players) the text: Team 1 controles th...
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Owner of (Entering unit)) Not equal to (Owner of Control area 0000 <gen>)
          • Or - Any (Conditions) are true
            • Conditions
              • (Owner of (Entering unit)) Equal to Player 5 (Yellow)
              • (Owner of (Entering unit)) Equal to Player 6 (Orange)
              • (Owner of (Entering unit)) Equal to Player 7 (Green)
              • (Owner of (Entering unit)) Equal to Player 8 (Pink)
        • Then - Actions
          • Unit - Change ownership of Control area 0000 <gen> to Player 5 (Yellow) and Change color
          • Set Income_Team2 = (Income_Team2 + 15)
          • Set Income_Team1 = (Income_Team1 - 15)
          • Game - Display to (All players) the text: Team 2 controles th...
        • Else - Actions
Thisone Controles the Corrupted Moonwell
  • Coral Moon well
    • Events
      • Unit - A unit enters CorruptedMoonwell <gen>
    • Conditions
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Owner of (Entering unit)) Not equal to (Owner of Control area 0003 <gen>)
          • Or - Any (Conditions) are true
            • Conditions
              • (Owner of (Entering unit)) Equal to Player 1 (Red)
              • (Owner of (Entering unit)) Equal to Player 2 (Blue)
              • (Owner of (Entering unit)) Equal to Player 3 (Teal)
              • (Owner of (Entering unit)) Equal to Player 4 (Purple)
        • Then - Actions
          • Unit - Change ownership of Control area 0003 <gen> to Player 1 (Red) and Change color
          • Set Income_Team1 = (Income_Team1 + 10)
          • Set Income_Team2 = (Income_Team2 - 10)
          • Game - Display to (All players) the text: Team 1 controles th...
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Owner of (Entering unit)) Not equal to (Owner of Control area 0003 <gen>)
          • Or - Any (Conditions) are true
            • Conditions
              • (Owner of (Entering unit)) Equal to Player 5 (Yellow)
              • (Owner of (Entering unit)) Equal to Player 6 (Orange)
              • (Owner of (Entering unit)) Equal to Player 7 (Green)
              • (Owner of (Entering unit)) Equal to Player 8 (Pink)
        • Then - Actions
          • Unit - Change ownership of Control area 0003 <gen> to Player 5 (Yellow) and Change color
          • Set Income_Team2 = (Income_Team2 + 10)
          • Set Income_Team1 = (Income_Team1 - 10)
          • Game - Display to (All players) the text: Team 2 controles th...
        • Else - Actions

New Folder

this folder is for the Scoreboard
creates scoreboard
  • Leaderboard
    • Events
      • Map initialization
    • Conditions
    • Actions
      • Wait 1.00 seconds
      • Leaderboard - Create a leaderboard for (All players) titled Something Something...
      • Leaderboard - Add Player 9 (Gray) to (Last created leaderboard) with label Team 1's Income and value Income_Team1
      • Leaderboard - Add Player 10 (Light Blue) to (Last created leaderboard) with label Team 2's Income and value Income_Team2
      • Leaderboard - Show (Last created leaderboard)
      • Countdown Timer - Start Income_Timer as a Repeating timer that will expire in 25.00 seconds
      • Countdown Timer - Create a timer window for (Last started timer) with title Seconds until next ...
      • Countdown Timer - Show (Last created timer window)

Thisone updates the scoreboard


  • Leaderboard updater
    • Events
      • Time - Every 0.01 seconds of game time
    • Conditions
    • Actions
      • Leaderboard - Add Player 9 (Gray) to (Last created leaderboard) with label Team 1's Income and value Income_Team1
      • Leaderboard - Add Player 10 (Light Blue) to (Last created leaderboard) with label Team 2's Income and value Income_Team2
      • Leaderboard - Show (Last created leaderboard)
here is the testmap ^^
Help_map.JPG

Phew... :p that was abit work ^^

tell me some more about your map :):thumbs_up:
 
Level 5
Joined
Sep 27, 2008
Messages
147
it is Blackrock(red),Bleeding Hollow (green), Twillight (purple) and Shadow Coulin or something xD (pink) vs Stromwind (blue), Brotherhood of horse (teal), Holy Order (yellow) and Boarder Guards (orange)

(wow thats a lot stuff don't think i am gonne do it today but if i am done it is maby gonne be a map By Troynl and Saphire) XD
 
Status
Not open for further replies.
Top