Frictional Games Forum (read-only)

Full Version: Repeat a Script Function?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
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.
Thanks Big Grin
Pages: 1 2