The following warnings occurred:
Warning [2] count(): Parameter must be an array or an object that implements Countable - Line: 906 - File: showthread.php PHP 7.2.24-0ubuntu0.18.04.17 (Linux)
File Line Function
/showthread.php 906 errorHandler->error



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 Crowbars!!
Zjurc Offline
Junior Member

Posts: 43
Threads: 8
Joined: Jan 2012
Reputation: 0
#1
Shocked  Crowbars!!

Yes, crowbars. Guys, once again I need your help Tongue
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? Big Grin

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 Shy
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.


Attached Files
.jpg   Image 016.jpg (Size: 392.67 KB / Downloads: 111)
01-25-2012, 08:58 PM
Find


Messages In This Thread
Crowbars!! - by Zjurc - 01-25-2012, 08:58 PM
RE: Crowbars!! - by flamez3 - 01-26-2012, 02:44 AM
RE: Crowbars!! - by Zjurc - 01-26-2012, 07:26 AM
RE: Crowbars!! - by flamez3 - 01-26-2012, 09:19 AM
RE: Crowbars!! - by Zjurc - 01-26-2012, 09:54 AM
RE: Crowbars!! - by flamez3 - 01-26-2012, 11:22 AM
RE: Crowbars!! - by Zjurc - 01-26-2012, 11:49 AM
RE: Crowbars!! - by flamez3 - 01-26-2012, 01:35 PM
RE: Crowbars!! - by Zjurc - 01-26-2012, 02:01 PM
RE: Crowbars!! - by flamez3 - 01-26-2012, 05:10 PM
RE: Crowbars!! - by Zjurc - 01-26-2012, 05:23 PM
RE: Crowbars!! - by i3670 - 01-27-2012, 11:16 PM
RE: Crowbars!! - by Zjurc - 01-28-2012, 12:15 PM
RE: Crowbars!! - by i3670 - 01-28-2012, 01:18 PM



Users browsing this thread: 1 Guest(s)