Q48: HOW-TO: How to use the Overlay functionsArticle 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"
- Go to the Rooms tab, Setup Screen, and click the "Edit Script" button.
- At the top of the script, add this line:
int overlay_id;
- 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");
- 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)
|