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
Script Help Need help with Crowbar on door
flamez3 Offline
Posting Freak

Posts: 1,281
Threads: 48
Joined: Apr 2011
Reputation: 57
#4
RE: Need help with Crowbar on door


I'm too tired to tell you what everything means but here is the script. Put "crowbar_joint" in the door and set it unactive. Put a scriptarea next to the crowbar; this is for when the crowbar hits the scriptarea, it will trigger the "crowbarfunc". Put the scriptarea name where i made the text bold.

Quote:void OnStart()
{
AddUseItemCallback("crowbaractivate1", "crowbar_1", "cellar_wood01_4", "crowbar" , true);
AddEntityCollideCallback("crowbar_joint_1", "nameofscript", "crowbarfunc", true, 1);
}


void crowbar(string &in asItem, string &in asEntity)
{
SetEntityActive("crowbar_joint_1", true);
}


void crowbarfunc(string &in asParent, string &in asChild, int alState)
{
SetPropHealth("cellar_wood01_4", 0.0f);
SetEntityActive("crowbar_joint_1", false);
SetEntityActive("crowbar_dyn_1", true);
}

12-30-2011, 04:04 PM
Find


Messages In This Thread
Need help with Crowbar on door - by jessehmusic - 12-30-2011, 04:10 AM
RE: Need help with Crowbar on door - by flamez3 - 12-30-2011, 05:58 AM
RE: Need help with Crowbar on door - by flamez3 - 12-30-2011, 04:04 PM
RE: Need help with Crowbar on door - by flamez3 - 12-31-2011, 02:06 AM



Users browsing this thread: 4 Guest(s)