I want a building to gradually give Wood + Gold..

F

Furdy

Guest
For a custom map, wanting a building I can build which will give, say, 10g and 10w every 5 seconds

I am a bit of a n00b at this and can't figure it out for the life of me. I tried making an edited version of an Entangled gold mine since it had a "gold per interval" variable but it does not work

Should I be using triggers? o_O

Any help appreciated to the max :3

Edit: It is important that you only get resources while the building exists
 

dannyboydude

Ultra Cool Member
Reaction score
33
this is a realy easy one to configure at your own will

Code:
Money
    Events
        Time - Every 5.00 seconds of game time
    Conditions
    Actions
        Unit Group - Pick every unit in (Units in (Playable map area) matching ((Unit-type of (Triggering unit)) Equal to Storage)) and do (Actions)
            Loop - Actions
                Player - Add 10 to (Owner of (Picked unit)) Current gold
                Player - Add 10 to (Owner of (Picked unit)) Current lumber
 
F

Furdy

Guest
Okay, mine reads:

Resource Building
Events
Time - Every 5.00 seconds of game time
Conditions
Actions
Unit Group - Pick every unit in (Units in (Playable map area) matching ((Unit-type of (Triggering unit)) Equal to Troll Mine)) and do (Actions)
Loop - Actions
Player - Add 10 to (Owner of (Picked unit)) Current gold
Player - Add 10 to (Owner of (Picked unit)) Current lumber

Where am I going wrong? ;_;

(Doesn't work)
 

Squishy

You can change this now in User CP.
Reaction score
127
In the condition, you need to use Matching unit instead of triggering unit.
 

the_ideal

user title
Reaction score
61
And you have to include those last two lines of the triggers within the Loop - Action part.
 

Romek

Super Moderator
Reaction score
963
In the condition, you need to use Matching unit instead of triggering unit.

Yup. The trigger leaks also. And it runs every 5 seconds. Which is bad

And you have to include those last two lines of the triggers within the Loop - Action part.

They are. He just hasn't used code tags and the spaces are taken away.
 

Sirroelivan

Gunnerkrigg Court
Reaction score
95
Maybe also add "matching unit is alive equal to true" to the condition? Because I don't know if picking units includes dead ones?
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top