Frictional Games Forum (read-only)
help with a secret swing door - 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: help with a secret swing door (/thread-6630.html)



help with a secret swing door - WoollySammoth - 02-18-2011

Greetings earthlings!

I shall start by describing what i want to happen:
As the player character runs into a room the castle base secret door is open but as the player runs towards it he collides with an area and that causes the door to close.

I am able to make the door spin with a RotatePropToSpeed but this seems to rotate indefinitely; although, I can stop it on a different area with a stoppropmovement but this leave the player able to time the second trigger to stop rotating the door whilst open.

I've tried using the doorclosed thing but that doesn't seem to work (i think maybe because the secret door isn't like the 'real' doors in the editor).


Sorry if this has been asked before, i had a little check but couldn't find anythings.



Thanks for any help you can give me

Yours
Woolly


RE: help with a secret swing door - Tottel - 02-18-2011

For a secret door I don't really know, but I'm going to decribe how you would do it for a normal door. Logically, they should be handled in the same way.

If you want your door to suddenly swing closed when the player collides with an area; then using
Code:
SetSwingDoorLocked(string& asName, bool abLocked, bool abEffects);

should do the trick

If you want it to close more slowly first and then lock, then use some
Code:
AddPropForce(string& asName, float afX, float afY, float afZ, string& asCoordSystem);

first, and then after a second or so use the one above here to set it locked.