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

Detect if the cursor is above a unit

Status
Not open for further replies.
Level 9
Joined
Apr 19, 2011
Messages
447
Basicly, I am making a custom shop system.
The screen (made with terrain tiles) will be something like this:

XXXXXXXXXXXXXXXXXXXXXXX
XO.............XXX___________X
XXXXXXXXXXXX___________X
XO.............XXX___________X
XXXXXXXXXXXXXXXXXXXXXXX

Note, that the full screen is bigger than this. This is a mere sample.
Well, let's go to the main thing:

- The "X" are the frames of the window.
- The "." are the names of the differents things you can buy, made with floating texts.
- The "O" are the buttons. HERE is where I need what I said in the title.

The buttons will be made with units, and have the shape of a sphere. I have two spheres, one with flames around it, and another one without the flames.
Well, it would be nice if the buttons lighted when the player has the cursor above them. Normally, the buttons would be spheres without flames. When the player has the cursor above one of them, it should began lighting in flames.
That would be very nice for me. But for that, I need to do what I said in the title of the thread...
But, as I supposed, this seems to be impossible...:goblin_cry:

Anyone knows a way to do this? Maybe ANOTHER way to do it?

Regards
 
Level 14
Joined
Oct 6, 2008
Messages
759
How about doing this but when the player selects the button? You can make trigger to have effect over it when it is selected and by pressing the ESC key while selected to buy it. Or make another button that confirms that you want to buy the selected item. Or add a spell to each unit that when casted while the unit is selected it will buy it.
 
Level 9
Joined
Apr 19, 2011
Messages
447
I knew it. I can't do it. Well, I suppose I will work around with selections, it will probably look good too.

geries: You say that I could use vJass, but I am not interested in using it. I know that Jass is a better and more powerful tool than GUI, but I don't want to work in Jass.

Anyway, thank you all for your answers.

Regards
 
Status
Not open for further replies.
Top