spacer graphic
spacer graphic
Montage of games AGS Logo
spacer graphic

 

spacer graphic
Menu
spacer graphic Home
About
News
Features
Download AGS
spacer graphic Games 
Games main page
Award Winners
Picks of the month
Short games
Medium length games
Full length games
In Production
Hints & Tips
Community
Forums
AGSers World Map
Member websites
Chat
Resources
Tutorials
FAQ
Knowledge Base
Downloads
Links
AGS-related links

Q48: HOW-TO: How to use the Overlay functions

Article last updated: 29 March 2002


The information in this article applies to:
  • Adventure Game Studio v2.12 and later versions
  • Operating System: DOS & Windows


OVERVIEW

There has been some confusion about how the text and graphic overlays work within the text script.

DETAIL

Let's say we want to create a screen overlay in room 5 saying "There are many people in the area"
  1. Go to the Rooms tab, Setup Screen, and click the "Edit Script" button.
  2. At the top of the script, add this line:
    int overlay_id;
  3. Now, open up the script editor for whatever interaction you want to create the overlay, and use the following line:
    overlay_id = CreateTextOverlay (50, 30, 200, 1, 10, "There are many people in the area");
  4. Later on, when you want to remove the overlay, simply do:
    RemoveOverlay (overlay_id);
Or, if you want to display and remove the overlay all within one interaction, it's even easier. You can ignore the above and just do:
int overlay_id = CreateTextOverlay (50, 30, 200, 1, 10, "There are many people in the area");
Wait (100);
RemoveOverlay (overlay_id);


List all articles - Edit this article (admin only)