Adventure Game Studio

AGS Support => Beginners' Technical Questions => Topic started by: Phemar on Sat 06/03/2004 04:34:48

Title: Using a text overlay
Post by: Phemar on Sat 06/03/2004 04:34:48

Does anyone know how to do this:

I've made a text overlay and programmed it so that it goes on if your mouse is on a hotspot. Now I want it to dissappear when the mouse moves off.

Anyone?
Title: Re:Using a text overlay
Post by: Scorpiorus on Sat 06/03/2004 13:36:03
Each overlay has an ID number which can be used to control the overlay in question (ex. remove it). You get overlay ID this way:

//the top of the script
int overlayID;


overlayID = CreateTextOverlay(...);


if mouse isn't over a certain hotspot:

if (IsOverlayValid(overlayID)) { // check if it was created at all

 RemoveOverlay(overlayID); // remove it

}


~Cheers