Background frame even help

Started by Glenjamin, Thu 26/02/2015 19:44:13

Previous topic - Next topic

Glenjamin

I'm making a game where you can't read a book until you turn on the lights.
I have two background frames. One where the light is on, and one where the light is off.
How can I make it so the player cannot read the book until the light is on?

Ibispi

#1
Hi Gfreezie,
use this function:
Code: ags
if (GetBackgroundFrame()==1)
{
    Display("Roger cannot read the Bible when the lights are turned off!");
}

when the player clicks on the book.

Also, I'm not sure if you are familiar with it, but there is one more function you need to use when you start up the room (on room load):
Code: ags
SetBackgroundFrame (1);

^this sets the background of the room to be locked onto a certain frame instead of cycling the frames like it normally does to create an animation effect.

Use the "Index" tab in AGS manual, you can find a lot of cool and interesting functions there.
Cheers! :smiley:

SMF spam blocked by CleanTalk