Facebook Twitter YouTube Frictional Games | Forum | Newsletter | Dev Blog | Dev Wiki | Support | Shelf | Store

Privacy Policy


Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
hammer removes an padlock. help
Author Message
johnbanana Offline
Junior Member

Posts: 9
Joined: Oct 2011
Reputation: 0
Post: #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 all posts by this user Quote this message in a reply
Your Computer Offline
SCAN ME!

Posts: 3,236
Joined: Jul 2011
Reputation: 216
Post: #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
Visit this user's website Find all posts by this user Quote this message in a reply
nemesis567 Offline
Posting Freak

Posts: 840
Joined: May 2011
Reputation: 10
Post: #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 all posts by this user Quote this message in a reply
Post Reply 




User(s) browsing this thread: 1 Guest(s)