Facebook Twitter YouTube Frictional Games | Forum | Newsletter | Dev Blog | Dev Wiki | Support


Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Request Door Slowly Opens.
Author Message
Angerpull Offline
Member

Posts: 88
Joined: Jun 2011
Reputation: 0
Post: #1
Door Slowly Opens.

Hello, can anyone provide me with a script that will make a door slowly open when I walk towards it? That would be great!

-Angerpull Angel
07-30-2011 09:42 PM
Find all posts by this user Quote this message in a reply
palistov Offline
Posting Freak

Posts: 1,213
Joined: Mar 2011
Reputation: 57
Post: #2
RE: Door Slowly Opens.

Use these functions to make the door open.

SetSwingDoorDisableAutoClose(string& asName, true);
SetSwingDoorClosed(string& asName, false, false);
AddPropImpulse(string& asName, float afX, float afY, float afZ, "World");

Fiddle with the float values to make the door open. Look at the door in your level editor. The blue line is the Z axis, the red line is the X axis. You'll probably not need any Y value (green line) unless you have a door leading through the roof or something weird like that.

07-30-2011 10:04 PM
Find all posts by this user Quote this message in a reply
MrCookieh Offline
Member

Posts: 157
Joined: Jul 2011
Reputation: 0
Post: #3
RE: Door Slowly Opens.

AddPropForce(string& asName, float afX, float afY, float afZ, string& asCoordSystem);
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”

You have to use quite big numbers for doors, I think, but if your float isn't that big, it should open slowly Smile

The Well: Descent - Take a look at it!
07-30-2011 10:04 PM
Find all posts by this user Quote this message in a reply
Kyle Offline
Posting Freak

Posts: 910
Joined: Sep 2010
Reputation: 7
Post: #4
RE: Door Slowly Opens.

For a door, try the force of 1 - 3 in the correct direction. When I tried 5, it blasted open and closed fast... :/

07-30-2011 10:23 PM
Find all posts by this user Quote this message in a reply
Post Reply 




User(s) browsing this thread: 1 Guest(s)