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 Issue (Almost there!)
flamez3 Offline
Posting Freak

Posts: 1,281
Threads: 48
Joined: Apr 2011
Reputation: 57
#2
RE: Crowbar Issue (Almost there!)

The reason the door is unlocking too early is because the script tells it to.

void OnStart()
{
StopMusic(0, 1);
AddEntityCollideCallback("Player", "Locked_Desktop_Area", "GetDesktopQuest", true, -1);
AddEntityCollideCallback("Player", "Sound_Area1", "GetSound_Area1", true, 1);
AddTimer("Water_Objects", 0.01, "FloatObjects");
AddUseItemCallback("", "crowbar_1", "prison_locked", "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);
RemoveItem("crowbar_1");
}
void crowbarfunc(string &in asParent, string &in asChild, int alState)
{
SetPropHealth("prison_locked", 0.0f);
SetEntityActive("crowbar_joint_1", false);
SetEntityActive("crowbar_dyn_1", true);
PlaySoundAtEntity("", "unlock_door", "prison_locked", 0, false);
}


Use that. Is it telling you any fatal errors? Or is it just not working right?

01-01-2012, 05:41 PM
Find


Messages In This Thread
Crowbar Issue (Almost there!) - by Tiiwh - 01-01-2012, 05:35 PM
RE: Crowbar Issue (Almost there!) - by flamez3 - 01-01-2012, 05:41 PM
RE: Crowbar Issue (Almost there!) - by Tiiwh - 01-01-2012, 11:24 PM



Users browsing this thread: 1 Guest(s)