Adventure Game Studio

AGS Support => Beginners' Technical Questions => Topic started by: on Sun 22/01/2006 15:32:42

Title: Text overlays for "mouse moves over hotspot"
Post by: on Sun 22/01/2006 15:32:42
Hi everybody!
How can I create text overlays  that are displayed as long as the mouse moves over a hotspot and not only for a defined time by "Wait"? 

I only know:
Overlay* myOverlay = Overlay.CreateTextual(50,80,120,2,15,"This is a text overlay");
Wait(40);
myOverlay.Remove();

Would an "if"-request (If mouse over hotspot then create overlay) do better?

Thanks in advance!!

Alice
Title: Re: Text overlays for "mouse moves over hotspot"
Post by: DoorKnobHandle on Sun 22/01/2006 15:34:07
Actually I wouldn't use overlays for this at all.

Using RawPrint, RawRestoreScreen and RawSaveScreen will make it way easier. Look those functions up in the manual and you'll feel enlightened. ;)
Title: Re: Text overlays for "mouse moves over hotspot"
Post by: strazer on Sun 22/01/2006 16:07:26
Try this module (http://www.adventuregamestudio.co.uk/yabb/index.php?topic=23328).
Title: Re: Text overlays for "mouse moves over hotspot"
Post by: Gilbert on Mon 23/01/2006 01:23:18
If you script it yourself, easiest way is to use a GUI label, using the raw function is not recommended as it involves saving/restore the background, and there's a limitation that the text will be drawn onto the background, so it'll be below characters and objects in genereal (worst case is, it's on a walkbehind area, like for example a lamp post, and the character is behind it, whihc can yield very funny results).


But yeah, try my module.