• 💀 Happy Halloween! 💀 It's time to vote for the best terrain! Check out the entries to Hive's HD Terrain Contest #2 - Vampire Folklore.❗️Poll closes on November 14, 2023. 🔗Click here to cast your vote!
  • 🏆 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!
  • 🏆 HD Level Design Contest #1 is OPEN! Contestants must create a maze with at least one entry point, and at least one exit point. The map should be made in HD mode, and should not be openable in SD. Only custom models from Hive's HD model and texture sections are allowed. The only exceptions are DNC models and omnilights. This is mainly a visual and design oriented contest, not technical. The UI and video walkthrough rules are there to give everyone an equal shot at victory by standardizing how viewers see the terrain. 🔗Click here to enter!

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