• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • ✅ The POLL for Hive's Texturing Contest #33 is OPEN! Vote for the TOP 3 SKINS! 🔗Click here to cast your vote!

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
 
Level 31
Joined
Jul 10, 2007
Messages
6,306
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....
 
Level 31
Joined
Jul 10, 2007
Messages
6,306
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