• 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.

need help with money generation trig

Status
Not open for further replies.
Level 1
Joined
Jan 25, 2008
Messages
3
ok i got it working for one building i want to make it where when i build that building it adds to the income like it should and itsa map im improving on "so a edit" and they are already producing gold just when i make more then 1 they wont produce gold after the 1st one
 
Dude, just add a trigger that when a building is finished being built, add income x to total income for player variable y. When a building is destroyed, remove x

x + y

x - y

the building should only add to the original variable. Use player slots or player numbers as the index and make it an array variable. I could make a 1 minute function for you to call up, but it's just too easy, especially if you got one working...

Every time building w/e is finished, add the income it adds to your income variable for that player, all done ^_^
 
Level 1
Joined
Jan 25, 2008
Messages
3
ya but its hard when ur not rly familiar with it and ur using variables u didn make so i need 2 variables for this?cuz its like
event
Unit - A unit owned by Player 1 (Red) Finishes construction "its for all players"
condition
(Unit-type of (Triggering unit)) Equal to Money Farm L-1
action
Set timegold[(Player number of (Triggering player))] = (2 x 2)

and when i do this it works once but after building the 2nd one it doesnt give the same effect i just get +4 over and over unstead of +6 or more so after the second 1 its useless....
 
Set timegold[(Player number of (Triggering player))] = (2 x 2)

look at the 2x2, your equation is messed up

instead of a 2, set it to to timegold[(player number of(triggeringplayer))] + 2 or x2 or w/e

that should fix it ^_^

so change that first 2 into your variable

change the second into whatever you want to add to it : P

Like I said, quick fix ^_^
 
Status
Not open for further replies.
Top