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?
Raymond Offline
Member

Posts: 126
Threads: 24
Joined: Feb 2011
Reputation: 0
#1
How to make a crowbar break a door?

Title, i don't know how to make a crowbar break a door Huh.

One World To Another [DEMO] coming soon.
03-09-2011, 11:38 AM
Find
Kyle Offline
Posting Freak

Posts: 911
Threads: 36
Joined: Sep 2010
Reputation: 7
#2
RE: How to make a crowbar break a door?

It took me from a few days to a week to figure it out, but the thing is it doesn't want to work the way I want it to work.

If you truely want to make a crowbar break a door, then go load the game level that had you break the door open with it, and copy and edit it to work with whatever you got planning. Don't forget the scripting!

03-09-2011, 01:01 PM
Find
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




Users browsing this thread: 1 Guest(s)