Adventure Game Studio

AGS Support => Beginners' Technical Questions => Topic started by: on Sat 15/01/2005 12:40:04

Title: Descriptions for hotspots [SOLVED]
Post by: on Sat 15/01/2005 12:40:04
Hi everyone.

I'm having a little problem and I seen unable to get it right.

In the game I'm creating I would love to see a short description of the hotspots aviables for clicking so the player doesn't get mad looking deseperate in all the rooms. My idea is that when the cursor gets over the hotspot (for example a bottle) in the low part of the screen should appear the "bottle" word, but only while the cursor stays over it, no more.

What I did to get this done was create a new character "Items" an when ever the cursor gets over a hotspot this character talks with a global message.

This works good, but it's a pain in the neck doing all the messages, and when the character talks it makes me wait, this makes the wait cursor appear, and makes the game unconfortable.
What i tried is to set the wait cursor to a blank sprite but that means that i lose the wait cursor.

Is there a way to set the character talk time to 0 so there will be no wait time for ONLY this character?
Title: Re: Descriptions for hotspots
Post by: Bernie on Sat 15/01/2005 14:25:10
There's an easier way. Create a GUI, make it transparent and put a text label on it. Set it to mode 'NORMAL' and not clickable.
Now, go to repeatedly execute in the global script, and paste this code:

//initialize string.
string invdesc;

//copy text of location into string.
GetLocationName(mouse.x,mouse.y,invdesc);

//Set gui label to text of string. Adjust command to point to your GUI and label.
SetLabelText(1,1,invdesc);

This will show the name of any object, character or hotspot the cursor is pointing at.
Title: Re: Descriptions for hotspots
Post by: on Sat 15/01/2005 14:36:01
thanks (indeed it's an easier way)  :o
Title: Re: Descriptions for hotspots
Post by: Proskrito on Sat 15/01/2005 14:46:19
and it can be even easier: just
QuoteCreate a GUI, make it transparent and put a text label on it. Set it to mode 'NORMAL' and not clickable.
and then set the label text to @OVERHOTSPOT@ , and you are done : )
Title: Re: Descriptions for hotspots
Post by: TerranRich on Wed 19/01/2005 02:56:22
Already in the BFAQ!! http://bfaq.terran-x.com/#guis05

Plus it directly quotes the manual. Don't you people read either??? :P