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
I'm probably missing something but this door won't unlock
liamthespy Offline
Junior Member

Posts: 26
Threads: 10
Joined: Jun 2012
Reputation: 0
#4
RE: I'm probably missing something but this door won't unlock

(06-18-2012, 02:46 PM)andyrockin123 Wrote: Please link the full script Tongue
oops, sorry guys.


////////////////////////////
// Run when entering map
void OnEnter()
{
SetEntityPlayerInteractCallback("bookmoveg", "trapopen", true);
SetEntityPlayerInteractCallback("scarekey", "machinefunc", true);
SetEntityPlayerInteractCallback("stovekey", "kitchenfunc", true);
AddUseItemCallback("", "kitchenkey", "kitchendoor", "Kitopen", true);
}

void kitopen(string &in asItem, string &in asEntity)
{
SetSwingDoorLocked("kitchendoor", false, true);
PlaySoundAtEntity("", "unlock_door", "kitchendoor", 0, false);
}

void machinefunc(string &in item)
{
GiveSanityDamage(40.0f, true);
SetPropHealth("barrel01_5", 0);
SetPropHealth("barrel01_4", 0);
SetPropHealth("barrel01_1", 0);
SetPropHealth("barrel01_2", 0);
SetPropHealth("barrel01_6", 0);
SetPropHealth("barrel01_7", 0);
SetPropHealth("barrel01_8", 0);
SetPropHealth("barrel01_9", 0);
SetPropHealth("barrel01_10", 0);
SetPropHealth("barrel01_11", 0);
SetPropHealth("barrel01_12", 0);
SetPropHealth("barrel01_13", 0);
SetPropHealth("barrel01_14", 0);
SetEntityActive("machinemon", true);
}

void trapopen(string &in item)
{
GiveSanityDamage(20.0f, true);
SetPropHealth("barrier", 0);
SetEntityActive("barrier", false);
SetEntityActive("trapmon", true);
AddEnemyPatrolNode("trapmon", "PathNodeArea_1", 0, "");
AddEnemyPatrolNode("trapmon", "PathNodeArea_2", 0, "");
AddEnemyPatrolNode("trapmon", "PathNodeArea_3", 0, "");
AddEnemyPatrolNode("trapmon", "PathNodeArea_4", 0, "");
}

void kitchenfunc(string &in item)
{
SetEntityActive("kitchenmon", true);
AddEnemyPatrolNode("kitchenmon", "path1", 0, "");
AddEnemyPatrolNode("kitchenmon", "path2", 0, "");
AddEnemyPatrolNode("kitchenmon", "path3", 0, "");
AddEnemyPatrolNode("kitchenmon", "path4", 0, "");
}
////////////////////////////
// Run when leaving map
void OnLeave()
{

}
06-18-2012, 02:52 PM
Find


Messages In This Thread
RE: I'm probably missing something but this door won't unlock - by liamthespy - 06-18-2012, 02:52 PM



Users browsing this thread: 1 Guest(s)