• 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.
  • The Hive's 22nd Icon Contest: Creep Abilities is now concluded, time to vote for your favourite set of icons! Click here to vote!
  • ✅ The POLL for Hive's Texturing Contest #34 is OPEN! Vote for the TOP 3 SKINS! 🔗Click here to cast your vote!
  • ✅ The POLL for Hive's Techtree Contest #20 is OPEN! Vote for the TOP 3 FACTIONS! 🔗Click here to cast your vote!

Identifying golden mine target for haunted mine?

Status
Not open for further replies.
Level 8
Joined
May 8, 2012
Messages
134
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!
 
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)
 
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.
 
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?
 
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.
 
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
 
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

Status
Not open for further replies.
Back
Top