Frictional Games Forum (read-only)

Full Version: How to make door moves??? N00B
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hello N00B here

How do you make a door open ??? Undecided Undecided Undecided
(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.