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
hammer removes an padlock. help
johnbanana Offline
Junior Member

Posts: 9
Threads: 4
Joined: Oct 2011
Reputation: 0
#1
Brick  hammer removes an padlock. help

i using a hammer to remove an entety "padlock" Confused


Quote:void OnStart()

{
AddUseItemCallback("", "stone_hammer_1", "padlock_1", "Padlock", true);

}

void Padlock(string &in asItem, string &in asEntity)
{
RemoveEntityCollideCallback("stone_hammer_1", "padlock_1");
}
this is what i got...
any one know how to sovle this problem?
10-21-2011, 08:19 PM
Find
Your Computer Offline
SCAN ME!

Posts: 3,456
Threads: 32
Joined: Jul 2011
Reputation: 235
#2
RE: hammer removes an padlock. help

Unless i'm mistaken, you should be able to use SetPropHealth on the padlock when the hammer is used on the lock. Setting the health of the padlock to 0 should break the padlock.

Tutorials: From Noob to Pro
10-21-2011, 09:35 PM
Website Find
nemesis567 Offline
Posting Freak

Posts: 874
Threads: 65
Joined: May 2011
Reputation: 10
#3
RE: hammer removes an padlock. help

Why do you have this:

PHP Code: (Select All)
void Padlock(string &in asItemstring &in asEntity)
 {
     
RemoveEntityCollideCallback("stone_hammer_1""padlock_1");
 } 

When apparently all you create is an UseItemCallback(called when you use the two items via inventory selection and targetting)?

I think Your Computer is right about the health part. Setting padlocks health to 0 will replace it with the broken one/break it.

Today I dreamt the life I could live forever. You only know that when you feel it for you know not what you like until you've experienced it.
10-22-2011, 12:09 AM
Find




Users browsing this thread: 1 Guest(s)