Frictional Games Forum (read-only)
How to make door moves??? N00B - Printable Version

+- Frictional Games Forum (read-only) (https://www.frictionalgames.com/forum)
+-- Forum: Amnesia: The Dark Descent (https://www.frictionalgames.com/forum/forum-6.html)
+--- Forum: Custom Stories, TCs & Mods (https://www.frictionalgames.com/forum/forum-35.html)
+--- Thread: How to make door moves??? N00B (/thread-7745.html)



How to make door moves??? N00B - X4anco - 05-01-2011

Hello N00B here

How do you make a door open ??? Undecided Undecided Undecided


RE: How to make door moves??? N00B - Roenlond - 05-01-2011

(05-01-2011, 11:22 PM)X4anco Wrote: Hello N00B here

How do you make a door open ??? Undecided Undecided Undecided

Code:
void OnStart()
{
AddEntityCollideCallback("Player", "scarestuff_area", "scarestuff", true, 1);
}

void scarestuff(string &in asParent , string &in asChild , int alState)
{
SetSwingDoorClosed("scarydoor", false, false);
SetSwingDoorDisableAutoClose("scarydoor", true);
AddPropImpulse("scarydoor", [b]5.0, 0, 0[/b], "World");
}

Excerpt of a code I use, it works for me but you may need to tweak the bold part with your own coordinates.