Message location and delay

Started by heirofmaul, Mon 26/03/2007 05:38:15

Previous topic - Next topic

heirofmaul

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.

Ashen

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).
I know what you're thinking ... Don't think that.

heirofmaul

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.

Candle


heirofmaul

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.

Gilbert

Try setting the mode of the GUI to "always displayed" (or something like that, just too lazy to check for exact wordings).

Ashen

'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).
I know what you're thinking ... Don't think that.

heirofmaul

Ok, well once I download and import the module into my project, what more do I need to do with it?  Anything?  (Sorry, beginner  :-\ )

Candle

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.

heirofmaul

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.

Ashen

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.
I know what you're thinking ... Don't think that.

heirofmaul

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?

Khris

Make both the GUI and the label as wide as the screen, then center the label's text.

SMF spam blocked by CleanTalk