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

Identifying golden mine target for haunted mine?

Status
Not open for further replies.
Level 4
Joined
May 8, 2012
Messages
108
Hello.

I'm currently working on a map where players can only build buildings into predefined spots. ATM I'm using gold mine as a template for these spots and basing all my buildings off haunted gold mine - Which works fine other than the fact you can build a haunted gold mine on any mine....

Is there any way to check for the target of a build order to limit it so that you can only build certain buildings per "mine" template?

Help would be much appreciated!
 
Level 4
Joined
May 8, 2012
Messages
108
Well what I really mean to do is have these "predefined" spots spread out on the map.
Each spot has a designated race assigned to it;

Say you send a builder to build a barracks on a barracks spot, if you're not of the same race you won't get to build a barracks rather you'll build an "outpost" instead.
If you try to build anything other than a barracks you won't be able to.

So I have a "goldmine" for each race, representing different buildings - and I want to detect which goldmine its being built on (E.G Goldmine type 1, goldmine type 2)
 
Level 14
Joined
Oct 6, 2008
Messages
759
Each spot will need a trigger to check if the proper building is starting to be build. Stop the worker, destroy the building, refund the resourses... It is quite tiresome work.

Also to remove the need for gold mine make a copy of all buildings, shrink them by a very little and place them at each location. Make them atleast 60% transperant, and give them locust, invulnerability and make them use 'fly' movement OR remove all effects that might block a building to be build over it. If I have time I could make a little example tomorrow.
 
Level 4
Joined
May 8, 2012
Messages
108
The gold mine works for me well because each building generates gold which is represented by the actual "Gold: #" above the building.

Hmm... so out of interest, would having say 50-60 triggers for this take a load of space? if not I don't mind making one for each spot, I'll just work with templates and add them as I go. But is there really no way to detect the target building for a haunted mine? not even via Jass?
 
Level 14
Joined
Oct 6, 2008
Messages
759
I am not familiar with Jass but I am sure there is something like a detection system.
It would be much more fun if you try my idea from the other post, believe me. Much work must be done but will look somewhat unique.
 
Level 4
Joined
May 8, 2012
Messages
108
Lordkoon - Thanks bro, hopefully the alternative will work good.

Mckill - I don't understand, its it impossible to detect the gold mine via triggers? or you mean to say it's possible only via triggers?
 
Level 14
Joined
Oct 6, 2008
Messages
759
For some reason I couldn't upload the map so I give you screenshots of my idea.
WC3ScrnShot_062212_095426_01.jpg

WC3ScrnShot_062212_095502_03.jpg

WC3ScrnShot_062212_095456_02.jpg
 
Level 4
Joined
May 8, 2012
Messages
108
Ooooo!! I likey!
I assume it would be possible to have the squares beneath hide and reappear if the building is destroyed? also would it be possible to have them without locust and then add the locust whilst the building is being built ontop?
 
Level 14
Joined
Oct 6, 2008
Messages
759
The squares I made from doodads but you can make them destructables and hide them with trigger if there is a building on top(I have no idea how this would be done, I just know it can be xd)
I think once locust is added even if you remove it via trigger the unit will still be unselectable. Am not sure about that tho.
 
Like I said, it should be triggered, here's a sample...

- ANY unit can't built outside a goldmine's range...
- Farm & Altar can be built on the LEFT, but not on the RIGHT goldmine...
- Barracks & Scout can be built on the LEFT, but not on the RIGHT goldmine...

the downside of this is you need to register ALL your units to a particular goldmine, so instead of making
many haunted goldmine, this can do without making them...
 

Attachments

  • LimitBuilding.w3x
    24.7 KB · Views: 72
Level 4
Joined
May 8, 2012
Messages
108
Well I could still use the haunted mine method with that one right?
I prefer the building to replace the mine because im not actually using mines, im using the mine template with a circle of power and no gold ability (the gold is generated by buildings not mines)...

still, thanks!!!
 
Level 4
Joined
May 8, 2012
Messages
108
I think I can pretty much make a working trigger on my own now based on what you and lordkoon gave me.

I think i'll end up doing a combination of both :)

thanks, again!
 
Status
Not open for further replies.
Top