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

Need assistance i can't figure out how to make text appear when hovering over something

Status
Not open for further replies.
Level 3
Joined
Aug 5, 2017
Messages
20
Hi, I'm trying to create signs that will display text to the one hovering over the sign with their mouse. A good example of what i'm talking about is how floor signs work in Origin Z. I only want the text to show for the one hovering over the sign as this will be used for teleporters and having it display constantly doesn't look very good. If anyone knows how you can do this i'd very much appreciate any help you can give me <3.

 
Last edited:
Level 12
Joined
Feb 5, 2018
Messages
521
By the picture of it, it seems that the unit is selected and then the text appears?

If this is the case, it is pretty easy to make.

Also I think you can abuse some destructibles and change the name from Cage to something like "Hatchery access level 1".

I think that the easiest way to do this is create destructibles and change their name, make them invulnerable and then when you hover with your mouse it shows the name =)

Hope I helped
 

Attachments

  • WC3ScrnShot_120521_024129_001.png
    WC3ScrnShot_120521_024129_001.png
    3.4 MB · Views: 24

Uncle

Warcraft Moderator
Level 64
Joined
Aug 10, 2018
Messages
6,536
There's a way to get which unit the mouse is focused on but there's no GUI function for it:
vJASS:
BlzGetMouseFocusUnit()
If you need to use GUI you can use Custom script:
  • Custom script: set udg_SomeUnit = BlzGetMouseFocusUnit()
I'm assuming you need to use GetLocalPlayer() to make it work for specific players.

Probably worth reading:
 
Status
Not open for further replies.
Top