Frictional Games Forum (read-only)
[SCRIPT] Teleport Player Scripting Question - 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] Teleport Player Scripting Question (/thread-25739.html)



Teleport Player Scripting Question - BigG2k Gameplay - 07-24-2014

Is there a way to use a method to Teleport the "PLAYER" while maintaining their camera orientation??.

example: the player look up when walking in a script area that use callcollidecallback to make a function that makes the player teleport. but I want it to be the least noticeable possible. so what could be the best way to do it? Huh


RE: Teleport Player Scripting Question - victorkim890(KimmyChimmy) - 07-24-2014

yea
Code:
SetPlayerActive(false);



RE: Teleport Player Scripting Question - PutraenusAlivius - 07-24-2014

Well, what I know is that you can't make a teleportation like that unnoticeable, the only best thing you can do is use a FadeOut and FadeIn.

@victorkim890(KimmyChimmy)
That's used to make the player not moving and not looking.


RE: Teleport Player Scripting Question - BigG2k Gameplay - 07-24-2014

thanks i will test things out and let you know if i made something work.


RE: Teleport Player Scripting Question - victorkim890(KimmyChimmy) - 07-24-2014

(07-24-2014, 03:51 AM)BigG2k Gameplay Wrote: Is there a way to use a method to Teleport the "PLAYER" while maintaining their camera orientation??.

i thought he meant the players doesnt move at all


RE: Teleport Player Scripting Question - MrBehemoth - 07-25-2014

(07-24-2014, 05:02 AM)Robosprog Wrote: Actually, I imagine if you recreated a room in perfect detail, forced the player to look at something specific whilst making them inactive then making them active after teleporting them again to the exact same spot, they'd not have noticed the teleportation per se, but rather that there was a cinematic. There are better ways to do this, however, and teleporting should really only be used in more cinematic sequences rather than to fuck with the player.

If you give the player something specific and interesting to look at, they might not even notice they are being forced.

This reminds me of something I've been planning. I haven't tested it, but I was thinking about making a "look-trigger".

So, imagine you've got a script area. When the player enters it, it triggers a StartPlayerLookAt() with zero speed, targeted to something big enough to fill the centre half of the screen from where the player is standing. When they exit the script area, it triggers a StopPlayerLookAt(). Because the LookAt has zero speed, the player's view won't actually be nudged towards it. When they do happen to look at it, it should immediately trigger another StartPlayerLookAt() that is targeted to something small, with a low, but not zero speed.

It's a bit of a fudge, but the effect would be that while the player is within the script area, if they look roughly in the direction you want, then their view is subtly snapped to the precise direction you want, and you can then trigger something to happen.

You could then teleport them to an identical room at that point.