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
Making a door creek open script. Help!
jssjr90 Offline
Member

Posts: 169
Threads: 39
Joined: Jun 2011
Reputation: 0
#1
Question  Making a door creek open script. Help!

I relay want to know how to creek open a door slowly like in the first level of amnesia.
This is my script so far but it does not have any effects on the door.
////////////////////////


void OnStart()

{
AddEntityCollideCallback("Player", "opendoor", "opendoorfunc", true, 1);

}

void opendoorfunc(string &in asParent, string &in asChild, int alState)


{
SetSwingDoorClosed("cellar_wood01_slow_1", false, false);
AddPropForce("cellar_wood01_slow_1", 90, 0, 0, "world");
}

If anyone like to help me out on this or know how to creek open a door, just like on the first level of amnesia please let me know. Thanks!
11-27-2011, 03:52 PM
Find
Khyrpa Offline
Senior Member

Posts: 638
Threads: 10
Joined: Apr 2011
Reputation: 24
#2
RE: Making a door creek open script. Help!

You're doing the right thing, just keep tweaking the prop force to get the effect you wanted.

11-27-2011, 04:02 PM
Find
Unearthlybrutal Offline
Posting Freak

Posts: 775
Threads: 12
Joined: May 2011
Reputation: 26
#3
RE: Making a door creek open script. Help!



Try this. Helps?


Spoiler below!

void OnStart()
{
AddEntityCollideCallback("Player", "opendoor", "opendoorfunc", true, 1);
}

void opendoorfunc(string &in asParent, string &in asChild, int alState)
{
SetSwingDoorDisableAutoClose("cellar_wood01_slow_1", true);
SetSwingDoorClosed("cellar_wood01_slow_1", false, false);
AddPropForce("cellar_wood01_slow_1", 90, 0, 0, "world");
}


When Life No Longer Exists
Full-conversion mod
11-27-2011, 04:03 PM
Website Find
jssjr90 Offline
Member

Posts: 169
Threads: 39
Joined: Jun 2011
Reputation: 0
#4
RE: Making a door creek open script. Help!

Thank you Unearthlybrutal. Oddly enough I had to set it all to 290, on XY and Z. Still I got the door to creek open. Thanks!
11-27-2011, 11:18 PM
Find




Users browsing this thread: 4 Guest(s)