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
Crowbar won't work on door! help
PutraenusAlivius Offline
Posting Freak

Posts: 4,713
Threads: 75
Joined: Dec 2012
Reputation: 119
#6
RE: Crowbar won't work on door! help

Spoiler below!

PHP Code: (Select All)
void OnStart()
{
AddUseItemCallback("", "Crowbar_Entity", "Door", "CrowbarInteract", true);
AddEntityCollideCallback("Crowbar_Joint", "JointCollideArea_1", "BreakDoorCrowbar", true, 1);
}
 
 
void CrowbarInteract(string &in asItem, string &in asEntity)
 {
 
AddTimer("", 0.2f, "TimerSwitchJoint");
 
RemoveItem("Crowbar_Entity");
 }
 
 
void TimerSwitchJoint(string &in asTimer)
 {
 
PlaySoundAtEntity("","puzzle_place_jar.snt", "Door", 0, false);
 
SetEntityActive("Crowbar_Joint", true);
 }
 
 
void BreakDoorCrowbar(string &in asParent, string &in asChild, int alState)
 {
 
AddPlayerSanity(25);
 
PlayMusic("10_puzzle01.ogg", false, 0.7, 0.1, 10, false);
 
SetSwingDoorLocked("Door", false, true);
 
AddPropImpulse("Door", 0, 0, -50, "World");
 
SetSwingDoorDisableAutoClose("Door", true);
 
SetSwingDoorClosed("Door", false, false);
 
SetMoveObjectState("prison_1", 1);
 
PlaySoundAtEntity("","break_wood_metal", "EffectsArea", 0, false);
 
CreateParticleSystemAtEntity("", "ps_hit_wood", "EffectsArea", false);
 
SetEntityActive("Crowbar_Joint", false);
 
SetLocalVarInt("DoorVarInt", 1);
 } 
 
 
void OnEnter()
{
}
 
 
void OnLeave()
{
} 


You might wanna rename some script areas and items in your map...

"Veni, vidi, vici."
"I came, I saw, I conquered."
12-23-2013, 05:07 PM
Find


Messages In This Thread
RE: Crowbar won't work on door! help - by PutraenusAlivius - 12-23-2013, 05:07 PM
RE: Crowbar won't work on door! help - by Froge - 12-23-2013, 06:34 PM
RE: Crowbar won't work on door! help - by daortir - 12-25-2013, 04:02 PM
RE: Crowbar won't work on door! help - by daortir - 12-25-2013, 07:12 PM
RE: Crowbar won't work on door! help - by daortir - 12-25-2013, 10:22 PM



Users browsing this thread: 1 Guest(s)