Adventure Game Studio

AGS Support => Beginners' Technical Questions => Topic started by: ktalebian on Mon 20/02/2006 06:30:50

Title: Mouse over
Post by: ktalebian on Mon 20/02/2006 06:30:50
Hi, can I add a text when my mouse goes over something? I know I can show a message, but I want to show a subtitle!
Title: Re: Mouse over
Post by: Ashen on Mon 20/02/2006 10:53:20
The easiest way would be to have a GUI (or use the existing STATUSLINE GUI) with a label, with it's text set to @OVERHOTSPOT@ - that'll tell you what the mouse is currently over. If you want something more detailed (e.g. 'Use Door' instead of just 'Door') try a forum search for statusline or LEC statusline. This thread (http://www.adventuregamestudio.co.uk/yabb/index.php?topic=6240.0) has a quite simple way - but it's in the old-style code so it'll take a little adapting.

If you want something different - you're going to have to be more specific.

EDIT: Corrected @OVERHOTSPOT@
Title: Re: Mouse over
Post by: ktalebian on Tue 21/02/2006 07:49:33
I am so sorry to bother, but I have no idea how to do that! Is there a tutorial that explains all these comands somewhere?
So I went to GUI, and the first option is STATUSLINE
now what?
Title: Re: Mouse over
Post by: A�rendyll (formerly Yurina) on Tue 21/02/2006 07:56:39
What you see in there is the list of all GUI's available.

This is how to do it:
1. Click on the STATUSLINE GUI (which will probably will be selected already).
2. Add a label (toolbar above the example, move your mouse over the options to take a look at what it is.)
3. Add a script name, like MouseOverLabel (or something), in the little window that floats on your screen now.
4. On the bottom of that window, click the lowest option twice.
5. Click the label twice.
6. Add @HOTSPOTOVER@ between the lines where the flashing | is. (On the next line)

Try this out, and tell what outcome you get.

~Yurina
Title: Re: Mouse over
Post by: ktalebian on Tue 21/02/2006 08:01:53
Again I am sorry if I am a pain in the ..., but what? What do I click? What do you mean by toolbar?
Title: Re: Mouse over
Post by: Scummbuddy on Tue 21/02/2006 08:14:19
When you've got the GUI's manager selected, from under Game Editor along the left side, the GUI section will pop up on the right.

The GUI Edior will now be open, and there will be a list of GUI's already created. Select the STATUSLINE one.

To the right of where you selected STATUSLINE is the GUI name. It is STATUSLINE. Below that are tools in a horizontal row. That is the toolbar. The second one should be Add GUI Label.
Title: Re: Mouse over
Post by: Ashen on Tue 21/02/2006 11:20:48
Manual entry, with some other tokens (http://www.adventuregamestudio.co.uk/manual/Interface%20text.htm) (like @OVERHOTSPOT@) that might be handy.
Title: Re: Mouse over
Post by: monkey0506 on Tue 21/02/2006 14:08:02
Yes, well as Ashen just pointed out, it is @OVERHOTSPOT@, not @HOTSPOTOVER@.
Title: Re: Mouse over
Post by: ktalebian on Tue 21/02/2006 22:48:35
Quote from: Scummbuddy on Tue 21/02/2006 08:14:19
When you've got the GUI's manager selected, from under Game Editor along the left side, the GUI section will pop up on the right.

The GUI Edior will now be open, and there will be a list of GUI's already created. Select the STATUSLINE one.

To the right of where you selected STATUSLINE is the GUI name. It is STATUSLINE. Below that are tools in a horizontal row. That is the toolbar. The second one should be Add GUI Label.


I know, but when I click the button, nothing happens! Nothing!
Title: Re: Mouse over
Post by: monkey0506 on Tue 21/02/2006 22:56:03
Click the button...then click and HOLD on the GUI, then move the mouse to draw the box for the label.
Title: Re: Mouse over
Post by: ktalebian on Wed 22/02/2006 09:10:44
oook, thx, so I made the thing. I changed the script thing to MouseOverLable.
Yurina told me to double click the lowest option, which is the height option. But, with the height, you could only type in numbers!
Also, once I've done this, how do I use it?
Title: Re: Mouse over
Post by: Ashen on Wed 22/02/2006 10:45:13
You want to change the Label's text, right? So double-click the 'Text' property, and type @OVERHOTSPOT@ into the textbox that appears.

Then that's it. When you start the game, the name of whatever object, hotspot or character the mouse is over will be displayed on the STATUSLINE GUI at the top of the screen. The only other thing you might have to do is adjust the width of the label, to fit longer names.