Frictional Games Forum (read-only)
Repeat a Script Function? - 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: Repeat a Script Function? (/thread-25935.html)

Pages: 1 2


RE: Repeat a Script Function? - Mudbill - 08-22-2014

If you want the player to fall down and teleport, you need to script the whole sequence.

Start with making the player fall. You can tilt the camera with FadePlayerRollTo and move the camera down if you need to, using FadePlayerHeadPos. Use a timer to have these be more smooth and timed. Add a FadeOut script to make the screen black before you teleport them. If you have 1 second in the FadeOut script, add another timer with 1 second, or perhaps 2 if you wish. In that callback, teleport the player using TeleportPlayer with the name of the player start area. Oh, and don't forget to FadeIn again.

That's basically it. I'd give you an example, but this is fairly straight forward, so I hope you can manage it. It just takes some testing and adjusting to get right. Remember timers; they're good.


RE: Repeat a Script Function? - Amnesiaplayer - 08-22-2014

Thanks Big Grin