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
Push up door smooth script
FragdaddyXXL Offline
Member

Posts: 136
Threads: 20
Joined: Apr 2012
Reputation: 7
#2
RE: Push up door smooth script

Quote:void AddPropForce(string& asName, float afX, float afY, float afZ, string& asCoordSystem);
void AddPropImpulse(string& asName, float afX, float afY, float afZ, string& asCoordSystem);
void AddBodyForce(string& asName, float afX, float afY, float afZ, string& asCoordSystem);
void AddBodyImpulse(string& asName, float afX, float afY, float afZ, string& asCoordSystem);
Pushes objects. Note that rather high values are needed when applying forces.
asName - the object to push
afX - direction along the X-axis
afY - direction along the Y-axis
afZ - direction along the Z-axis
asCoordSystem - determines which coordinate system is used, usually “world”

Try using an impulse to open the door. I've had problems in the past with this, and you're bound to run into them as well. You need to make it so that the door does not "snap" into the closed position with this:
Quote:void SetSwingDoorDisableAutoClose(string& asName, bool abDisableAutoClose);
Deactivates the “auto-close” when a door is nearly closed.

And then set the door to be just a little open already. You do that in the editor. You click on the door, and set its open amount to 0.1.

Now when the player enters an area, add a prop impulse to open the door. You'll have to do some trial and error to get just the right amount of impulse.

Dark Seclusion Here
05-22-2012, 09:48 PM
Find


Messages In This Thread
Push up door smooth script - by stevenbocco - 05-22-2012, 08:59 PM
RE: Push up door smooth script - by FragdaddyXXL - 05-22-2012, 09:48 PM
RE: Push up door smooth script - by stevenbocco - 05-22-2012, 10:42 PM
RE: Push up door smooth script - by stevenbocco - 05-23-2012, 12:14 PM
RE: Push up door smooth script - by FragdaddyXXL - 05-23-2012, 06:13 PM
RE: Push up door smooth script - by paththeir - 05-29-2012, 10:47 AM
RE: Push up door smooth script - by Adrianis - 05-29-2012, 01:33 PM



Users browsing this thread: 1 Guest(s)