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
Unlock door when timer is run out
dasde Offline
Junior Member

Posts: 30
Threads: 6
Joined: May 2011
Reputation: 0
#10
RE: Unlock door when timer is run out

(05-27-2011, 03:08 PM)teddifisk Wrote: Then you are doing something wrong send us the WHOLE script and let us see?

Well if you absolutely want it, then here it is:
//===========================================
     // Starter's Script File!
     //===========================================

     //===========================================
     // This runs when the map first starts
     void OnStart()
     {
        AddUseItemCallback("UseKeyOnDoor", "key_tomb_rusty_2", "level_wood_1", "UseKeyOnDoor", true);
     }
    
        
    



     //===========================================
     // This runs when the player enters the map
     void OnEnter()
     {
     AddTimer("", 52.0f, "Door_Timer");
     }

     //===========================================
     // This runs when the player leaves the map
     void OnLeave()
     {
     }
    
    
     //===========================================
    
/////////////////////////////////
//LAST DOOR//
void UseKeyOnDoor(string &in asItem, string &in asEntity)
{
    PlaySoundAtEntity("unlocked", "unlock_door", asEntity, 0.0f, false);
    
    GiveSanityBoostSmall();
    
    SetLevelDoorLocked(asEntity, false);
    RemoveItem(asItem);
    
    CompleteQuest("02LockedDoosr", "02LockedDoor");

    
}
//LAST DOOR//
///////////////////////////////


///////////////////////////////
// START SWING DOOR

void Door_timer(string &in asTimer)
{
SetSwingDoorLocked("BruteDoor_1", false, true);
}



For the record, LAST DOOR is a door that leads to another map, but the code is taken from another script. LevelDoors is oddly easier to work with.
05-27-2011, 03:11 PM
Find


Messages In This Thread
Unlock door when timer is run out - by dasde - 05-27-2011, 02:31 PM
RE: Unlock door when timer is run out - by Greven - 05-27-2011, 02:35 PM
RE: Unlock door when timer is run out - by xtron - 05-27-2011, 02:46 PM
RE: Unlock door when timer is run out - by Greven - 05-27-2011, 02:51 PM
RE: Unlock door when timer is run out - by dasde - 05-27-2011, 02:51 PM
RE: Unlock door when timer is run out - by dasde - 05-27-2011, 02:54 PM
RE: Unlock door when timer is run out - by Greven - 05-27-2011, 03:00 PM
RE: Unlock door when timer is run out - by dasde - 05-27-2011, 03:04 PM
RE: Unlock door when timer is run out - by Greven - 05-27-2011, 03:11 PM
RE: Unlock door when timer is run out - by dasde - 05-27-2011, 03:22 PM
RE: Unlock door when timer is run out - by dasde - 05-27-2011, 03:11 PM
RE: Unlock door when timer is run out - by Greven - 05-27-2011, 03:25 PM
RE: Unlock door when timer is run out - by dasde - 05-27-2011, 03:33 PM



Users browsing this thread: 4 Guest(s)