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 How to make sledgehammer break door?
serbusfish Offline
Member

Posts: 211
Threads: 75
Joined: Aug 2012
Reputation: 0
#3
RE: How to make sledgehammer break door?

(04-05-2013, 01:25 AM)NaxEla Wrote: Put a script area slightly in front of the door, and script it so that when the sledgehammer collides with that script area, the door will break (by setting its health to 0).

PHP Code: (Select All)
void OnStart()
{
    
AddEntityCollideCallback("sledge_hammer_name""script_area_name""BreakDoor"true1);
}

void BreakDoor(string &in parentstring &in childint state)
{
    
SetPropHealth("door_name"0);


That's awesome pal, thanks Smile

04-05-2013, 03:19 AM
Find


Messages In This Thread
RE: How to make sledgehammer break door? - by serbusfish - 04-05-2013, 03:19 AM



Users browsing this thread: 1 Guest(s)