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
* AGS Manual
  * Scripting
    * Room functions

SetBackgroundFrame

SetBackgroundFrame (int frame)
Locks the background to frame number FRAME of an animating-background screen. (Values for FRAME are from 0 to 4). This allows you to use the animating backgrounds feature for another purpose - you can have two frames of the background, one for example with a spaceship crashed on it. Then, once the right event has happened, call SetBackgroundFrame in the Player Enters Room event to set the background before the screen fades in.

Pass the frame as -1 to return to the default behaviour of automatically cycling through all the background frames.

The frame lock is released when the game changes rooms.

Example:

if (GetGlobalInt(20)==1)
    SetBackgroundFrame(4); 
will change the current room's background frame to 4 if the global integer 20 is 1.

See Also: GetBackgroundFrame


User comments and notes
There are currently no user comments on this page.
The user comment facility is currently disabled.