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
How to make a crowbar break a door?
Anxt Offline
Senior Member

Posts: 588
Threads: 12
Joined: Mar 2011
Reputation: 10
#3
RE: How to make a crowbar break a door?

I actually put that into one of my most recent maps, and here's how it works:

First, you have the player use the crowbar on the door.

Next, you have, in the map, a NON-ACTIVE "crowbar_joint" entity. Upon using the crowbar on the door, set the crowbar_joint active. Now, basically the joint works as a lever. The next thing you need to do is create an area near the edge of the joint's movement limit, such that, when the crowbar reaches the area, it calls a new function.

So, to do this, you will need the following:

AddUseItemCallback for your crowbar and your door;
AddEntityCollideCallback for your crowbar_joint and your area;
Inactive crowbar_joint in the map, preferably placed such that it looks like it is going in the edge of the door;
An area on the map placed such that the joint will enter it towards the end of its movement range;
A function to open the door and give it an impulse, which will give the appearance of the crowbar prying the door open;
Sounds and effects if you so choose (like Kyle said, take a look at the map for the guest room from the main game for more details on this stuff)

That should be about it. Hope that helped Smile

03-10-2011, 12:12 AM
Find


Messages In This Thread
How to make a crowbar break a door? - by Raymond - 03-09-2011, 11:38 AM
RE: How to make a crowbar break a door? - by Kyle - 03-09-2011, 01:01 PM
RE: How to make a crowbar break a door? - by Anxt - 03-10-2011, 12:12 AM



Users browsing this thread: 1 Guest(s)