jssjr90
Member
Posts: 169
Threads: 39
Joined: Jun 2011
Reputation:
0
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
Khyrpa
Senior Member
Posts: 638
Threads: 10
Joined: Apr 2011
Reputation:
24
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
Unearthlybrutal
Posting Freak
Posts: 775
Threads: 12
Joined: May 2011
Reputation:
26
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");
}
11-27-2011, 04:03 PM
jssjr90
Member
Posts: 169
Threads: 39
Joined: Jun 2011
Reputation:
0
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