Adventure Game Studio

AGS Support => Beginners' Technical Questions => Topic started by: heirofmaul on Mon 26/03/2007 05:38:15

Title: Message location and delay
Post by: heirofmaul on Mon 26/03/2007 05:38:15
Hi everyone.

Now, this may be a group of simple problems but I have thoroughly combed the help documentation as well as the forums but I can't find my solution.

In the style of Lucas Arts games like Monkey Island, I have hotspots that make a message pop up when you move the mouse over one.  But I need to know how to (1) move the location of all such messages to the lower portion of the screen (like the Lucas Arts style) and (2) make the messages a NON-blocking function so that my character doesn't stop moving and so that as soon as I move the mouse off of the hotspot, the message goes away and I don't have to wait for it to disappear.

If someone could help me with this I'd be most greatful.  Thanks.
Title: Re: Message location and delay
Post by: Ashen on Mon 26/03/2007 11:37:59
This has actually been covered many times before, but I guess not quite in this way.
In short, use a GUI Label with the text set to @OVERHOTSPOT@. (The name is misleading - don't worry, it also works for Objects and Characters.) Position the GUI wherever you want and that's it, you should now have a 'message' that displays the name of whatever the mouse is over.

If you want more complicated messages (like Mode sensitive - 'Look at X', 'Talk to X', etc), try a forum search ('statusline' or 'statusline GUI' should get some useful results) or download a LucasArts template to see how it's done (see the sticky in this forums, or AGS Resources (http://www.americangirlscouts.org/agsresources/)).
Title: Re: Message location and delay
Post by: heirofmaul on Tue 27/03/2007 01:39:59
Ok, I tried creating a GUI Label and setting the text to "@OVERHOTSPOT@" but still nothing pops up when my mouse goes over things.  Do I need some scripting along with this?

I also tried downloading a LucasArts template but it was not fully compatible with the latest version of AGS, as well as partially in German.
Title: Re: Message location and delay
Post by: Candle on Tue 27/03/2007 05:42:56
Try this and see if does what you want.
http://www.adventuregamestudio.co.uk/yabb/index.php?topic=26306.0
Title: Re: Message location and delay
Post by: heirofmaul on Tue 27/03/2007 09:39:53
Hmmm... no, that didn't seem to do it.  Thanks for trying to help though.  It seems like Ashen knows what I want and knows how to do it pretty easily, but I think I'm missing something probably really obvious that isn't in their directions.
Title: Re: Message location and delay
Post by: Gilbert on Tue 27/03/2007 10:01:11
Try setting the mode of the GUI to "always displayed" (or something like that, just too lazy to check for exact wordings).
Title: Re: Message location and delay
Post by: Ashen on Tue 27/03/2007 10:48:46
'Normal', is the visibility type you want. Also make sure the font, colour, etc, are set to something readable (black text on a black background won't work).

The Descrption module was actually one of the things I meant for you to find in a search, I just couldn't be bothered to dig out the link (thanks, Candle).
Title: Re: Message location and delay
Post by: heirofmaul on Tue 27/03/2007 11:37:39
Ok, well once I download and import the module into my project, what more do I need to do with it?  Anything?  (Sorry, beginner  :-\ )
Title: Re: Message location and delay
Post by: Candle on Tue 27/03/2007 14:34:25
Just make sure the hotspot or object has a name and it will show with mouse moves over it.
You can set in the Module where you want it to show by the mouse too.
Title: Re: Message location and delay
Post by: heirofmaul on Mon 02/04/2007 07:10:31
Alright, I got it to finally get working as far as displaying things correctly, but I still have a couple small issues.

First, what the heck size does my GUI need to be to get this thing positioned right and everything, and is there a quick and efficient way to do it with scripting, such as gQuitgui.centre() but at the bottom of the screen?

And second, how do I go about NOT having it display the character name when I scroll over them?  Do I simply not name that character, or will that screw up any scripting issues?  Or is there a better way, to make the character inactive to such things (besides the "clickable" option)?

Thanks.
Title: Re: Message location and delay
Post by: Ashen on Mon 02/04/2007 10:51:27
Provided you don't use the name in script anywhere, not naming a character shouldn't have any impact. (NOTE: That's te Character Name, not the Script Name. Chances are you'll use the Script name or Script-o-name of a character a lot, so do give them one of those.)

You could code the statusline instead of using @OVERHOTSPOT@, and then you'd be able to selectively ignore certain Characters - but just not naming them is much easier.
Title: Re: Message location and delay
Post by: heirofmaul on Tue 03/04/2007 00:21:12
Yeah, you're right Ashen.  Thanks.

But as far as the bottom/centering issue for the GUI, have any scripting shortcuts or do I just need to do some trial and error as far as manually positioning it?
Title: Re: Message location and delay
Post by: Khris on Tue 03/04/2007 00:34:14
Make both the GUI and the label as wide as the screen, then center the label's text.