• 🏆 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!
  • 🏆 Hive's 6th HD Modeling Contest: Mechanical is now open! Design and model a mechanical creature, mechanized animal, a futuristic robotic being, or anything else your imagination can tinker with! 📅 Submissions close on June 30, 2024. Don't miss this opportunity to let your creativity shine! Enter now and show us your mechanical masterpiece!🔗 Click here to enter!

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