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


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

Posts: 94
Joined: Jul 2011
Reputation: 0
Post: #24
RE: How to end custom story as a Demo?

(07-14-2011 07:38 PM)xtron Wrote:  
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.

The thing is, it's not a swing door, it's a level door
07-14-2011 08:15 PM
Find all posts by this user Quote this message in a reply
Post Reply 


Messages In This Thread
RE: How to end custom story as a Demo? - Zypherzemus - 07-14-2011 08:15 PM



User(s) browsing this thread: 1 Guest(s)