Facebook Twitter YouTube Frictional Games | Forum | Privacy Policy | Dev Blog | Dev Wiki | Support | Gametee


Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How to end custom story as a Demo?
Author Message
xtron Offline
Senior Member

Posts: 402
Threads: 37
Joined: May 2011
Reputation: 2
#23
RE: How to end custom story as a Demo?

void OnStart()
{
AddUseItemCallback("", "key1", "door1", "unlock_door", true);
}

void unlock_door(string &in asItem, string &in asEntity)
{
SetSwingDoorLocked("door1", false, false);
if(GetSwingDoorLocked("door1") == false)
    {
    AddTimer("", 2.5f, "timer_credits");
    FadeOut(2);
    }
}

void timer_credits (string &in astimer)
{
    StartCredits("01_Vicarious.ogg", false, "Ending", "MainCredits", 1);
}

Change key1 to the key name and door1 to the door name.

When you insert the key unlock_door will check if the door is locked and if it's not the screen will fadeout and play the credits.

[Image: 44917299.jpg]Dubstep <3
07-14-2011, 07:38 PM
Find Reply


Messages In This Thread
RE: How to end custom story as a Demo? - by xtron - 07-14-2011, 03:11 AM
RE: How to end custom story as a Demo? - by xtron - 07-14-2011, 12:30 PM
RE: How to end custom story as a Demo? - by xtron - 07-14-2011, 05:54 PM
RE: How to end custom story as a Demo? - by xtron - 07-14-2011, 07:38 PM
RE: How to end custom story as a Demo? - by xtron - 07-14-2011, 09:20 PM
RE: How to end custom story as a Demo? - by xtron - 07-15-2011, 12:20 AM
RE: How to end custom story as a Demo? - by xtron - 07-15-2011, 01:00 AM
RE: How to end custom story as a Demo? - by xtron - 07-16-2011, 10:20 PM



Users browsing this thread: 1 Guest(s)