Adventure Game Studio

AGS Support => Beginners' Technical Questions => Topic started by: mason.works on Sun 02/01/2011 20:58:02

Title: Problem with Mouse Move Descriptions
Post by: mason.works on Sun 02/01/2011 20:58:02
I seem to be struggling with what should be a basic thing in my game. All I want to do is have a description of a hotspot when the mouse moves over it. I've tried googling the problem, searching the forums and checked the begginners FAQ and found nothing, not to say there's nothing there, it's just that I don't know where I should be looking for an answer.

I did find some lines of code, but I'm not very knowledgable with code and they didn't seem to work. I'm sure this question has been asked before, all I'm asking for is to be pointed in the right direction.

Cheers!
Title: Re: Problem with Mouse Move Descriptions
Post by: poltergeist on Sun 02/01/2011 22:21:52
I struggled with this only a couple of hours ago and it turns out the 'fix' is actually pretty easy!

What you need to do is create a GUI label where your hotspot description will be shown and, after setting up its design and layout, enter "@OVERHOTSPOT@" (without the quotation marks) in its 'Text' field (under 'Appearance' in the GUI's properties section).

That should work. You don't really need any other code in version 3.x. There are other 'special markers' which you can read about if you search for "Editing the GUIs" in the index.
Title: Re: Problem with Mouse Move Descriptions
Post by: mason.works on Mon 03/01/2011 13:42:56
Ah thats superb! Cheers buddy!
Title: Re: Problem with Mouse Move Descriptions
Post by: poltergeist on Mon 03/01/2011 14:00:58
Glad I could help :P
Title: Re: Problem with Mouse Move Descriptions
Post by: hedgefield on Mon 03/01/2011 15:15:06
For future reference, you can also use this module (http://www.adventuregamestudio.co.uk/yabb/index.php?topic=26306.0) to plug any sort of description label straight into your game :)
Title: Re: Problem with Mouse Move Descriptions
Post by: Khris on Mon 03/01/2011 19:11:42
And you can use Game.GetLocationName(mouse.x, mouse.y) if you want to alter the description in any way before displaying it.