# [Trigger]A Income Off Of Buildings

Status
Not open for further replies.

#### mattman111

Level 5
i was just wondering how do you make a income off of the buildings you make with triggers and the income would be based on how many buildings you have?(i realy need help on this FAST)

#### Just_Spectating

Level 39
you count for every building that the player has, and have a periodic trigger that will give him (Variable X) x (amount of gold each building gives income) gold/lumber.

#### mattman111

Level 5
umm can you put that into a picture trigger

#### Just_Spectating

Level 39
well i dont have my editor out right now so ill post it later.

#### goombawithgun

Level 3
1st you have to make your building a variable. for my map i had 12 income buildings.

---NAME-- = ---Type of variable- ----value(building)----
Set Civ_1 = (Units of type Civ Building 1)

SET VARIABLE
Events
Map initialization
Conditions
Actions
Set Civ_1 = (Units of type Civ Building 1)
Set Civ_2 = (Units of type Civ Building 2)
Set Civ_3 = (Units of type Civ Building 3)
Set Civ_4 = (Units of type Civ Building 4)
Set Civ_5 = (Units of type Civ Building 5)
Set Civ_6 = (Units of type Civ Building 6)
Set Civ_7 = (Units of type Civ Building 7)
Set Civ_8 = (Units of type Civ Building 8)
Set Civ_9 = (Units of type Civ Building 9)
Set Civ_10 = (Units of type Civ Building 10)
Set Civ_11 = (Units of type Civ Building 11)
Set Civ_12 = (Units of type Civ Building 12)

Then you can incorporate those variables into your triggers....

Civ 1 income
Events
Time - Every 30.00 seconds of game time
Conditions
Actions
Unit Group - Pick every unit in Civ_1 and do (Player - Add 1 to (Owner of (Picked unit)) Current gold)

''Civ 1'' ---> is a variable // "player-add 1 (Owner of (Picked unit)) Current gold)" ---> is 'player - add property'

---the # 1 can be changed to any number you want it to be
---the event (Time- periodic can change value to however long you like)
---if you want the trigger to work only if the unit is alive, put in conditions "unit - is alive EQUAL TO True"

that help?
Don't forget to ADD REP, and sorry idk how to get pictures, i only know text =)
-------------> GL <------------

#### kj_

Level 5
Goombo you shouldn't ask for Rep xD
Anyway you can trigger picture via
[Trigger ](Your Triggers)[ /Triggers]
IE
• Hacks
• Events
• A unit dies
• Conditions
• Actions
• Unit - Create 12 footmen for Player 1 (red) facing blah blah
Be sure to have editor open and type it off directly or you will get [?]'s like one above and you will confuse people xD

#### goombawithgun

Level 3
huh? lol, i dont get that, do you type that into the reply box? cause when i do 'insert picture' i get a thing that asks for a website. and sorry bout rep, im new and i just wanted some =) apparently ive done a lot of double posting and i didn't know that it was bad.

#### mattman111

Level 5
that was helpful but this game i need it for will have 11 people building massavie amounts of buildings for lumber. how would you do it so WHen a player builds this building ever minute it adds 1 lumber to thier Lumber AMount

Last edited:

#### goombawithgun

Level 3
Civ 1 income
Events
Time - Every 60.00 seconds of game time
Conditions
Actions
Unit Group - Pick every unit in Civ_1 and do (Player - Add 1 to (Owner of (Picked unit)) Current LUMBER)

change those bold things,
make the variables set to your lumber buildings too.

#### mattman111

Level 5
thanks that did it i added some rep for you

#### Kwah

Level 24
I would recommend using arrays if you are not already. Also, use a game message to display how much you receive (only to that player), and a multiboard to list your total income.

Status
Not open for further replies.

Replies
15
Views
1K
Replies
7
Views
959
Replies
5
Views
939
Replies
8
Views
761
Replies
2
Views
498