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
Swing Door Locked Text?
Amnesiaplayer Offline
Senior Member

Posts: 539
Threads: 105
Joined: Jun 2014
Reputation: 0
#12
RE: Swing Door Locked Text?

Script
PHP Code: (Select All)
void OnStart()
{
StopMusic(11);
AddEntityCollideCallback("Player""BreakingArea""BoardCreak"true1);
AddUseItemCallback("""Crowbar""CellarDoor2""UseCrowbarOnDoor"true);
AddEntityCollideCallback("Joint""AreaBreak""BreakDoor"true1);
AddUseItemCallback("""Hamer""PlankDoor""UseHamerOnDoor"true);
AddUseItemCallback("""Bucket""AcidArea""FunctionGetAcid"true);
SetEntityPlayerInteractCallback("CellarDoor""GetSwingDoorLocked"false);
}

void BoardCreak(string&in asParentstring &in asChildint alState)
{
PlaySoundAtEntity("WoodCreaking""CREAKINGNOISE.snt""BreakingArea"0.5ffalse);
SetPropHealth("Plank1"0);
SetPropHealth("Plank2"0);
SetPropHealth("Plank3"0);
SetPropHealth("Plank4"0);
SetPropHealth("PlankE"0);
SetPropHealth("PlankX"0);
PlayMusic("12_amb"true0.7f10false);
SetEntityActive("BlockBox"true);
}

void UseCrowbarOnDoor(string &in asItemstring &in asEntity)
{
RemoveItem(asItem);
PlaySoundAtEntity("""player_crouch.snt""Player"0.05false);
AddTimer(asEntity0.2"TimerPlaceCrowbar");
}

void TimerPlaceCrowbar(string &in asTimer)
{
        
SetEntityActive("Joint"true);
        
PlaySoundAtEntity("""puzzle_place_jar.snt"asTimer0false);
}

void BreakDoor(string &in asParentstring &in asChildint alState)
{
        
SetEntityActive("Joint"false);
        
SetEntityActive("Broken"true);
 
        
SetSwingDoorLocked("CellarDoor2"falsefalse);
        
SetSwingDoorClosed("CellarDoor2"falsefalse);
        
SetSwingDoorDisableAutoClose("CellarDoor2"true);
      
        
CreateParticleSystemAtEntity("""ps_hit_wood.ps""AreaEffect"false);
        
PlaySoundAtEntity("""break_wood_metal""AreaEffect"0false);
        
PlaySoundAtEntity("WoodCreaking""CREAKINGNOISE.snt""UsBreakDoor"0.5ffalse);
 
        
GiveSanityBoostSmall();
 
        
PlayMusic("10_puzzle01.ogg"false0.70.110false);
}

void UseHamerOnDoor(string &in asItemstring &in asEntity)
{
SetPropHealth("PlankDoor"0);
RemoveItem("Hamer");
GiveSanityBoost();
PlaySoundAtEntity("WoodCreaking""CREAKINGNOISE.snt""UseHamerOnDoor"0.5ffalse);
SetSwingDoorLocked("CellarDoor"falsefalse);
SetMessage("Messages""UsedHammer"0);
}

void FunctionGetAcid(string &in asItemstring &in asEntity)
{
    
SetEntityActive("AcidBucket",true);
    
RemoveItem("Bucket");
    
PlaySoundAtEntity("""16_fill_oil.snt""Player"1.0ftrue);


if(
GetSwingDoorLocked("CellarDoor") == true)
{
SetMessage("Sign""CellarDoor"0);

Sad
09-24-2014, 06:15 AM
Find


Messages In This Thread
Swing Door Locked Text? - by Amnesiaplayer - 09-23-2014, 02:29 PM
RE: Swing Door Locked Text? - by Romulator - 09-23-2014, 02:51 PM
RE: Swing Door Locked Text? - by Amnesiaplayer - 09-23-2014, 03:41 PM
RE: Swing Door Locked Text? - by Romulator - 09-23-2014, 03:51 PM
RE: Swing Door Locked Text? - by Mudbill - 09-23-2014, 03:54 PM
RE: Swing Door Locked Text? - by Amnesiaplayer - 09-23-2014, 04:21 PM
RE: Swing Door Locked Text? - by Neelke - 09-23-2014, 04:27 PM
RE: Swing Door Locked Text? - by Amnesiaplayer - 09-23-2014, 04:29 PM
RE: Swing Door Locked Text? - by Neelke - 09-23-2014, 05:01 PM
RE: Swing Door Locked Text? - by Amnesiaplayer - 09-23-2014, 05:06 PM
RE: Swing Door Locked Text? - by Neelke - 09-23-2014, 07:07 PM
RE: Swing Door Locked Text? - by Amnesiaplayer - 09-24-2014, 06:15 AM
RE: Swing Door Locked Text? - by Romulator - 09-24-2014, 07:35 AM
RE: Swing Door Locked Text? - by Mudbill - 09-24-2014, 07:53 AM
RE: Swing Door Locked Text? - by Amnesiaplayer - 09-24-2014, 01:02 PM



Users browsing this thread: 1 Guest(s)