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
Request Door Slowly Opens.
Angerpull Offline
Member

Posts: 88
Threads: 24
Joined: Jun 2011
Reputation: 0
#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 Reply
palistov Offline
Posting Freak

Posts: 1,208
Threads: 67
Joined: Mar 2011
Reputation: 57
#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 Reply
MrCookieh Offline
Member

Posts: 157
Threads: 8
Joined: Jul 2011
Reputation: 0
#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 Reply
Kyle Offline
Posting Freak

Posts: 911
Threads: 36
Joined: Sep 2010
Reputation: 7
#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 Reply




Users browsing this thread: 1 Guest(s)