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: 107)
01-25-2012, 08:58 PM
Find
flamez3 Offline
Posting Freak

Posts: 1,281
Threads: 48
Joined: Apr 2011
Reputation: 57
#2
RE: Crowbars!!

Not every door in the game can be broken (if I'm wrong sorry : P). If you want to you can download scroobs castle remake and look at the hub map .hps. I did the crowbar and it worked fine for me. You really just need to name everything right. From the crowbar to the door.

And, what is not working? Can you put it in the door?

01-26-2012, 02:44 AM
Find
Zjurc Offline
Junior Member

Posts: 43
Threads: 8
Joined: Jan 2012
Reputation: 0
#3
RE: Crowbars!!

for the strangest reason, everything is named properly and simply does not work Sad
your theory of only some doors can be breakable is really good! I already tried two doors: the usual wooden poor looking-like, and standard Prison door. sorry im on mobile atm so i cant provide detailed info :p i am aware that mansion door can be broken, but i need a dungeon-looking door
01-26-2012, 07:26 AM
Find
flamez3 Offline
Posting Freak

Posts: 1,281
Threads: 48
Joined: Apr 2011
Reputation: 57
#4
RE: Crowbars!!

What doesn't work?

01-26-2012, 09:19 AM
Find
Zjurc Offline
Junior Member

Posts: 43
Threads: 8
Joined: Jan 2012
Reputation: 0
#5
RE: Crowbars!!

i just pickup the crowbar as usual... approach the door, try to use the crowbar ON the door... then message appears 'Cannot use the item this way!'
I suspect that the script, for some reason, does not actually recognize the door needs to be connected and smashed with the crowbar.
01-26-2012, 09:54 AM
Find
flamez3 Offline
Posting Freak

Posts: 1,281
Threads: 48
Joined: Apr 2011
Reputation: 57
#6
RE: Crowbars!!

Try uploading the whole Custom story and let me check it out myself?

01-26-2012, 11:22 AM
Find
Zjurc Offline
Junior Member

Posts: 43
Threads: 8
Joined: Jan 2012
Reputation: 0
#7
RE: Crowbars!!

as much as i appreciate your help, i cannot upload the whole custom story (its almost complete) i will though just upload the map that actually has the crowbar. that will be enough?
PS: dont feel offended, i just never trusted people a lot
(i am still on my mobile phone, and will upload the maps when i get home.. so in about two hours)
01-26-2012, 11:49 AM
Find
flamez3 Offline
Posting Freak

Posts: 1,281
Threads: 48
Joined: Apr 2011
Reputation: 57
#8
RE: Crowbars!!

It's okay, I understand. Upload them when your ready and I'll get back to you.

01-26-2012, 01:35 PM
Find
Zjurc Offline
Junior Member

Posts: 43
Threads: 8
Joined: Jan 2012
Reputation: 0
#9
RE: Crowbars!!

Here you go: http://www.mediafire.com/?76cs0qod7hboccw
the door that requires the crowbar is just up ahead. I've placed the crowbar right in front of it, too.

Cheers!
01-26-2012, 02:01 PM
Find
flamez3 Offline
Posting Freak

Posts: 1,281
Threads: 48
Joined: Apr 2011
Reputation: 57
#10
RE: Crowbars!!

Ermm. machineroom.hps doesnt have the script inside it? Where did you save the script you are using?

01-26-2012, 05:10 PM
Find




Users browsing this thread: 1 Guest(s)