• 🏆 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!

[General] Goldmine Capacity Floating Text

Status
Not open for further replies.
Level 8
Joined
Jun 13, 2010
Messages
344
Hi forum
I am making a Goldmine that can hold 8 at a time for the mining time of 10 seconds.
Now I would like to make it simple for the player to notice how many miners he has in the goldmine. So I was thinking of making a floating text just right below the goldmine, that tells the player how many miners there are currently active inside.

Is that possible? Probably, but I would not know how to put the text BELOW the goldmine..
 
Level 24
Joined
Aug 1, 2013
Messages
4,657
Forum won't talk to you ;)

This one seems to get the event when a unit enters a gold mine.
Be aware that Night Elf and Undead are different in that perspective.

However this one is pretty hard because you have to keep track of every unit that is inside the gold mine. Especially when he leaves you will get trouble.
The floating text is pretty simple. You create a floating text at the location of the gold mine + 200Y and save that floating text in a hastable under the key of the handle id of the goldmine and 0 as secondary key.
Then you save the number of units inside it under 1 and the player that has the units inside it under 2.

You do have to use timers to reduce the amount of the units inside so you will have to use JASS.
 
Level 8
Joined
Jun 13, 2010
Messages
344
You do have to use timers to reduce the amount of the units inside so you will have to use JASS.

I can't script. I really don't get it.
And my point is not for the whole mining trick. It really only is when the miners are inside the mine, to keep track of how many you have in there.
 
Status
Not open for further replies.
Top