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

Disable Gold Mine

Status
Not open for further replies.
Level 17
Joined
Feb 11, 2011
Messages
1,860
Hello,

Is it possible to disable a gold mine? By this I mean that Humans and Orcs will not be able to collect from them and Night Elf and Undead will not be able to build on them.

I have tried setting the gold in the mine to 0, but it gets destroyed when a worker tries to collect from it. I placed a dummy unit at the mine which seems to work; preventing the mine from being haunted/entangled.

Thanks,

Mr_Bean

EDIT: I tried removing Blighted Gold Mine Ability, Entangled Gold Mine Ability and Gold Mine Ability from the mine. It works, except for Entangled Gold Mines. If you try to mine from it after removing the ability, the game crashes.
 
Level 9
Joined
Jul 10, 2011
Messages
562
if you dont need it to be clickable make it a doodadd and if you need it to be clickable make a building and change it to look like a goldmine.

only downside is that it doesnt show the gold amount.
 
Level 4
Joined
Aug 5, 2011
Messages
99
why dont u just remove the gold mine ability, u can re-add it later... workers will be unable to enter it while it doesnt have the gold mine ability...

what do u do with the original mine? maybe its still using up pathing so the new one cant be placed there or use a small wait between the actions
 
Level 25
Joined
Jul 10, 2006
Messages
3,315
EDIT: I tried removing Blighted Gold Mine Ability, Entangled Gold Mine Ability and Gold Mine Ability from the mine. It works, except for Entangled Gold Mines. If you try to mine from it after removing the ability, the game crashes.

helekiller, please read. OP has already tried this.

In my experience, hiding a unit completely disables its pathing... I don't see how it will be created at a offset location. Is the new unit also a building with the same path? How far away is it being created?
 
Level 17
Joined
Feb 11, 2011
Messages
1,860
I can't remove the ability because, as I said in my first post, if a Night Elf wisp tries to mine from an Entangled Gold Mine after the ability has been removed, the game crashes.

I changed the dummy mine from a building to a unit and it works fine. I simply hide the original mine and create the dummy at its position.

EDIT: Does Warcraft 3 have a problem with creating buildings with triggers? I try to create a new gold mine (because hiding an entangled or haunted one still allows workers to collect gold!) but it creates it at strange places. Anyone had this problem?
 
Last edited:
Level 25
Joined
Jul 10, 2006
Messages
3,315
I've done some testing, and the Acolyte's harvest ability doesn't trigger Unit Starts the Effect of an Ability.

Trying some more things.

EDIT: Nope, can't find a way.

Back to the original problem, care to show a screenshot of how the dummy gold mines are placed badly?

EDIT2:
I have tried setting the gold in the mine to 0, but it gets destroyed when a worker tries to collect from it. I placed a dummy unit at the mine which seems to work; preventing the mine from being haunted/entangled.

We can work around this by making a trigger that orders workers to stop if they are ordered to mine from a gold mine.
 
Level 14
Joined
Oct 6, 2008
Messages
759
Hi Bean. Did you try the thing I offered on pm? Surrounding ork and human gold mines with pathing blocker to not allow workers to go in, and using a dummy unit with edit from the frost wyrm's freezing breath to freeze the night elf and undead gold mines?
 
Level 17
Joined
Feb 11, 2011
Messages
1,860
Hi Bean. Did you try the thing I offered on pm? Surrounding ork and human gold mines with pathing blocker to not allow workers to go in, and using a dummy unit with edit from the frost wyrm's freezing breath to freeze the night elf and undead gold mines?

I think I've found a solution. Everything works fine, but there is one small thing: if you disable a Haunted Mine with Acolytes inside, the Acolytes will continue to play their mining animation (although no gold will be collected). Then when the mine is restored, they will continue to play the mining animation but not collect any gold. The player must issue them to stop and then right-click on the mine.

what about simply storing the gold mine to hashtable/table and when unit is issued order targeting object check if the target is the gold mine and then do
JASS:
call IssueImmediateOrder(GetTriggerUnit(), "stop")

I think I will try something like this to solve the minor Acolyte issue I mentioned above. Thanks!
 
Status
Not open for further replies.
Top