Frictional Games Forum (read-only)
[SCRIPT] Help scripting an opening and closing 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 - Development (https://www.frictionalgames.com/forum/forum-38.html)
+---- Forum: Development Support (https://www.frictionalgames.com/forum/forum-39.html)
+---- Thread: [SCRIPT] Help scripting an opening and closing door. (/thread-13356.html)



Help scripting an opening and closing door. - WoollySammoth - 02-15-2012

Hallo!

Um...I would like to have the old haunted house trope of a door opening a little and then closing and then opening a little again and then closing (repeatedly) by its self until the player tries to interact with it, when it can just stop and I am having trouble figuring out how to do.

I can make doors open *or* close but not do both on an essentially infinite repeat.
I *think* i may need some sort of timer loop thing (or something) but i can't figure it out.
Anybody got any ideas?

It's just the opening and closing bit i need help with, i think i could probably figure out how to stop it on an interaction myself...once i can figure out how to start it.
Ta,
Yours
W.S.




RE: Help scripting an opening and closing door. - Your Computer - 02-15-2012

http://www.youtube.com/watch?v=VSZ_uWz-PeM&list=PLD326789BC99530C8&index=16


RE: Help scripting an opening and closing door. - WoollySammoth - 02-15-2012

(02-15-2012, 04:43 PM)Your Computer Wrote: http://www.youtube.com/watch?v=VSZ_uWz-PeM&list=PLD326789BC99530C8&index=16
Ooo, that's a better way of opening doors than i was using before (Big Grin) but not quite what i'm asking for.

See how that opens and then stops? I would like the door to open (say 1/4 of the way) and then close again. Then open, then close and then keep on doing it in a loop until it's interrupted.






RE: Help scripting an opening and closing door. - Your Computer - 02-15-2012

I provided the video not to teach you how to open a door, but for the fact that it provides example usage on timers.


RE: Help scripting an opening and closing door. - Statyk - 02-15-2012

These threads bring back so many feelings of Deja Vu...


RE: Help scripting an opening and closing door. - Linus Ă…gren - 02-16-2012

Take knowledge from this thread and tweak it so it fits what you want: http://www.frictionalgames.com/forum/thread-6624.html Wink