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
#7
RE: Need help with Crowbar on door

Okay, start again.

Put a crowbar joint where you want to move the crowbar and set it inactive.
Also put crowbar_dyn in the same spot as the crowbar_joint and set it inactive.
Then put a little scriptarea next to that crowbar, this so when the crowbar meets the scriptarea; function will happen.

Now:

Quote:void OnStart()
{
AddUseItemCallback("", "crowbar_1", "mansion_1", "CrowbarOnDoor", true);
AddEntityCollideCallback("crowbar_joint_1", "door_script_1", "crowbarfunc", true, 1);
}

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


void crowbarfunc(string &in asParent, string &in asChild, int alState)
{
SetPropHealth("mansion_1", 0.0f);
SetEntityActive("crowbar_joint_1", false);
SetEntityActive("crowbar_dyn_1", true);
}
Sorry I didn't explain it very good before. Smile

(This post was last modified: 12-31-2011, 02:08 AM by flamez3.)
12-31-2011, 02:06 AM
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)