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?
NaxEla Offline
Senior Member

Posts: 415
Threads: 5
Joined: Dec 2012
Reputation: 28
#2
RE: How to make sledgehammer break door?

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);


In Ruins [WIP]
04-05-2013, 01:25 AM
Find


Messages In This Thread
RE: How to make sledgehammer break door? - by NaxEla - 04-05-2013, 01:25 AM



Users browsing this thread: 1 Guest(s)