Yes, crowbars. Guys, once again I need your help
The problem: Crowbar joint, dyn AND the script area are fully set. Door is fully set. Script set(and probably working, no crashes). Crowbar (item) placed on the ground. Everything great, right?
But no, Mr. HPS decided to abuse me and shows me an error 'Cannot use item this way!' when i use the crowbar on the door.
I have looked through the forum (around 30 pages) and no luck. There was one guy who had the same problem and he magically fixed it by himself. Other threads were like 'Solved, delete this!' (which I extremely don't like, because just browsing through this forum and reading old threads helped me countless times)
So, I have no choice but to post it and hopefully solve it quickly.
Here's the script: (Its not the full script, of course.)
Thank you in advance
Quote: AddUseItemCallback("", "crowbar", "crowbardoor", "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("crowbardoor", 0.0f);
SetEntityActive("crowbar_joint_1", false);
SetEntityActive("crowbar_dyn_1", true);
}
PS: I've included an image from the level editor on how I've set the crowbars and the area. I just thought it might be helpful.