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

Altering Gold Mines

Status
Not open for further replies.
Level 2
Joined
Jun 3, 2007
Messages
20
  • Time - Money Expires
  • Player - Add City[2] to (Random player from CityPlayer[2]) Current Gold
  • Set City[2] = (City[2] + 100)
  • Neutral Building - Set Indiginous Settlement 0057 <gen> to City[2] gold
Money = Timer
City = Integer Array holding ammount of income you gain for cities you control
Indiginous Settlement 0057 <gen> = A renamed and modelled gold mine

Basically what I am attempting to do is get it to change the gold amount of the gold mine so that you see "Income: 200" and that is the income for that particular town. (Constantly changing integer not 200) In this section of trigger I want it to when the timer expires add the amount to the players gold, increase the amount so he gets more next time the timer expires and then to adjust the gold mine so that the player knows the money he is getting from the particular city. My problem is with the Neutral Building command. In all three triggers I set up I basically used this same command.

  • Neutral Building - Set Indiginous Settlement 0057 <gen> to City[2] gold
Everything else within this trigger works fine but I can't get the amount of gold to change, it stays at the default 12500.

Also if I destroy the haunted gold mine on top of the settlement it reverts back to 0 gold which is what it is meant to do but wont go back up again when it is resettled or a turn passes.

Can anyone help? I'm stumped.
 
Level 6
Joined
Mar 2, 2006
Messages
306
if you "haunted" the gold mine, call SetResourceAmount function (that is, Neutral Building - Set gold of a gold mine action) for a "haunting" unit (your city), not for the original gold-mine (settlement)... (you may need to save every city in a variable (array again) upon creation (haunting))

i do hope that i understood you correctly.
 
Status
Not open for further replies.
Top