Gold

For fulfilled maps that most likely don't work on the latest patch (1.24 or later).

Moderator: Cheaters

User avatar
qweasd011
Forum Addict
Posts: 451
Joined: November 21st, 2008, 9:36 am
Title: Coleen!

Gold

Post by qweasd011 »

I just wanted to ask how to make a gold trigger like in tree tag, every 9 seconds it gives you 5 gold and 7 lumber and it's in building for example.

A unit builds a resource house so it's a basic one then each resource house generates 5 gold and 7 lumber every 9 seconds.

Any Ideas please!
Image
User avatar
Lanaya
Banned-To-Be
Posts: 1378
Joined: July 28th, 2008, 6:28 pm
Title: Administrator

Re: Gold

Post by Lanaya »

mmm

Code: Select all

Add Farm
    Events
        Unit - A unit Finishes construction
    Conditions
        (Unit-type of (Constructed structure)) Equal to Resource House
    Actions
        Unit Group - Add (Constructed structure) to Unit_Group
        Set Player = (Owner of (Constructed structure))
        Trigger - Turn on Income

Code: Select all

Remove Farm
    Events
        Unit - A unit Dies
    Conditions
        (Unit-type of (Dying unit)) Equal to Resource House
    Actions
        Unit Group - Remove (Dying unit) from Unit_group

Code: Select all

Income
    Events
        Time - Every 9.00 seconds of game time
    Conditions
    Actions
        Player - Add (5 x (Number of units in Unit_Group)) to Player Current gold
        Player - Add (7 x (Number of units in Unit_Group)) to Player Current lumber
Income isn't initially on
Player is a player variable
and
Unit_Group... is a unit group variable

hope this helps.
Image
League of legends North America - Nietono
Arabidnun
Forum Staff
Posts: 506
Joined: August 5th, 2007, 1:38 pm
Title: Gui Expert
Location: *Unknown*

Re: Gold

Post by Arabidnun »

Why don't you just do Loop 1-8( trees)

Pick every unit = (farm) then

Add (# of farms x 5) to Player(integer a) current gold
Add (# of farms x 7) to Player(integer a) current lumber

Do this for every type of farm, and change variables.
Black-Hole
Forum Fanatic
Posts: 315
Joined: October 16th, 2007, 7:32 pm

Re: Gold

Post by Black-Hole »

Arabidnun wrote:Why don't you just do Loop 1-8( trees)

Pick every unit = (farm) then

Add (# of farms x 5) to Player(integer a) current gold
Add (# of farms x 7) to Player(integer a) current lumber

Do this for every type of farm, and change variables.
lol thats what i told him to do 3 days ago over MSN...