• 🏆 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!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

Different "gold" mines with different resources

Status
Not open for further replies.
Level 3
Joined
May 7, 2009
Messages
52
(Short version: How do I make a gold mine, for example, give lumber instead while also having another gold mine unit-type that actually gives gold?)

Hi! I've been trying for a while to make 3 different resources, which are all mined at a "gold" mine, (meaning they have different models and names but function like a gold mine - a worker goes on, the worker comes out, the worker turns in the resource at base, repeat) Obviously I'm using "Food" to display one of the resources.

Here's where the problem starts. :hohum: I was thinking of finding some way to detect which type of mine the unit went into, putting them in a unit group called Gathering_[Resource type here] and then when a unit turns in resources, it'll detect which group they're in and give the player the appropriate resource type using triggers. However, I can't seem to find any way to detect when a unit actually enters a gold mine. There's an "order" string for "harvest" but that only goes off when they turn in the resource and return (or if they are given the order to harvest directly using the "Gather" interface button.)

Basically I want to have 3 gold mine 'types' (Sawmill, Quarry, Mine) that each function like a Gold Mine, but each also gives a different resource type.



(Bonus points if there's a way to have a unique worker type for each building that can only gather from that type of building/resource, as it would be useful for a future map idea, but it's not my primary concern right now...)
 
Level 13
Joined
Oct 12, 2016
Messages
769
I can think of a way to do this with triggers. It would basically involve unit groups, counting the number of units in a structure's cargo hold, and periodically giving resources over time in triggers based on the number of workers in the structure. In fact, you could even add floating text over each structure to indicate the resources provided per interval.

For gold, obviously you'd use either the haunted gold mine ability or entangle gold mine. No triggers necessary.
It'd be different for a lumber or food increasing structure. For food, you'd have dummy units to increase your food cap limit. For both of these, maybe have a circle of power or something that you "capture" that can be upgraded into a resource structure rather than building on top of it.
 
Last edited:
Status
Not open for further replies.
Top