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!
Gold
Moderator: Cheaters
-
- Banned-To-Be
- Posts: 1378
- Joined: July 28th, 2008, 6:28 pm
- Title: Administrator
Re: Gold
mmm
Income isn't initially on
Player is a player variable
and
Unit_Group... is a unit group variable
hope this helps.
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
Player is a player variable
and
Unit_Group... is a unit group variable
hope this helps.
League of legends North America - Nietono
-
- Forum Staff
- Posts: 506
- Joined: August 5th, 2007, 1:38 pm
- Title: Gui Expert
- Location: *Unknown*
Re: Gold
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.
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.
-
- Forum Fanatic
- Posts: 315
- Joined: October 16th, 2007, 7:32 pm
Re: Gold
lol thats what i told him to do 3 days ago over MSN...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.