• Check out the results of the Techtree Contest #19!
  • 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.
  • Create a void inspired texture for Warcraft 3 and enter Hive's 34th Texturing Contest: Void! Click here to enter!
  • The Hive's 22nd Icon Contest: Creep Abilities is now concluded, time to vote for your favourite set of icons! Click here to vote!

Income option

Status
Not open for further replies.
Level 4
Joined
May 31, 2008
Messages
91
hi , i am making a map , i have a basic income amount of 10gold and 5 lumber per 10 seconds :grin:

i whanna make it like:
u build a tower that increase the income, but how to do that?:confused: help will be grealy aprecieted!!!:thumbs_up:

and also a happy early newyear to anyone :ned:
 
Example of Income Trigger

11icnio.jpg


An example from the map I'm working on.

You have to set up a integer variable as income, then make a trigger that once a tower: example
Event: unit finished construction​
Condition: Unit-type is = to [Scout Tower]​
Set variable: Income = to [Income + 10]​
 
Endorio, welcome to THW =)
You need array for Income variable.
Array = number of max players.

If you'll make it in the way Blooddancer wrote, don't forget to remove group memory leak.

Doh! Forgot about that :gg:
Thanks
 
Here's a good trigger for your need
  • Events
    • Time - Every 10.00 seconds of game time
  • Conditions
  • Actions
    • Unit Group - Pick every unit in (Units owned by Player 1 (Red) of type Tower) and do (Player - Add 10 to Player 1 (Red) Current gold)
    • Unit Group - Pick every unit in (Units owned by Player 1 (Red) of type Tower) and do (Player - Add 5 to Player 1 (Red) Current lumber)
this is very simple compared to others.
 
  • Angry
Reactions: Rui
You can also make it like this:
  • Income
    • Events
      • Time - Every X seconds of game time
    • Conditions
    • Actions
      • Set TempGroup = (Units in (Playable map area))
      • Unit Group - Pick every unit in TempGroup and do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Unit-type of (Picked unit)) Equal to <Your Unit>
            • Then - Actions
              • Player - Add X to (Owner of (Picked unit)) Current gold
              • Player - Add X to (Owner of (Picked unit)) Current lumber
            • Else - Actions
      • Custom script: call DestroyGroup(udg_TempGroup)
I hope this helps...
 
Last edited:
11icnio.jpg


An example from the map I'm working on.

You have to set up a integer variable as income, then make a trigger that once a tower: example
Event: unit finished construction​
Condition: Unit-type is = to [Scout Tower]​
Set variable: Income = to [Income + 10]​

how to do the guild hall's actions? help me :grin:
 
Status
Not open for further replies.
Back
Top