Teleporting Jolts & Player Position Variables - 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: Teleporting Jolts & Player Position Variables (/thread-24620.html) Pages:
1
2
|
Teleporting Jolts & Player Position Variables - Horrorable - 02-14-2014 Heya. I'm working on a script for a amnesia level and I've ran into a bump. Actually a jolt. I'm trying to teleport a player from one hallway to another, both hallways are identical. The goal is to get it so the player teleports, but no one can tell. What I have now is a Area across the hallway A, so when the player walks through it it teleports him to hallway B. However the teleport tends to screw things up. Change his camera angle, turn him around and stuff. This creates a jolt where as the player walks through this section of the hallway his camera will suddenly turn angles and he might find himself walking in another direction. Giving a noticeable jolt. Is there any way to get a variable for the players exact positions/head position? Then I could save the info right before the teleport and restore afterwords. If not does anyone else know a way to do this? ALSO, I could only figure out how to teleport from the area in the hallway A to a Player start in hallway B. So if the player is sneaking along the wall he is suddenly teleported into the middle. Another jolting problem. Any ideas? Thanks in advance for any help. You guys(and gals) are great If necessary I could fix the second problem by making multiple small areas across hallway A and multiple start positions in hallway B, and just teleport to different start positions based on which area the player collided with. There would still be a jolt but it would be smaller. I am hoping someone else has a smoother looking option though. Again, thanks to anyone that can help RE: Teleporting Jolts & Player Position Variables - Traggey - 02-14-2014 Moved to development support. RE: Teleporting Jolts & Player Position Variables - Mudbill - 02-14-2014 Teleporting players can be difficult to make appear seamless. To make it look a little more smooth, people often fade the screen out and back in. Frictional did this in the water cellar map with the water monster. If you don't do anything to control the movement of the player, it's going to look choppy. You can try forcing them to look in a certain direction using the StartPlayerLookAt function, or perhaps just make them faint or so. But if you rotated the PlayerStartArea with the small blue arrow pointing in the direction you want the player to look, I don't see why the player doesn't look that way. He should unless something interupted it. RE: Teleporting Jolts & Player Position Variables - Horrorable - 02-14-2014 (02-14-2014, 09:35 AM)Mudbill Wrote: Teleporting players can be difficult to make appear seamless. To make it look a little more smooth, people often fade the screen out and back in. Frictional did this in the water cellar map with the water monster. If you don't do anything to control the movement of the player, it's going to look choppy. You can try forcing them to look in a certain direction using the StartPlayerLookAt function, or perhaps just make them faint or so. Ah OK- Maybe I'll just have to put heavy black fog and hope they don't notice the transition. The reason I can't just rotate the PlayerStartArea is because the direction it's pointing in has to change. If the player backs into Hallway 1 then they blue arrow would have to be pointing a different direction than if he walked straight into it. What I planned to do was record the player's exact position/head position and then teleport him say 50 blocks over. Then restore the exact position (with 50 blocks added to his world position) and restore his head position exactly. But it seem's there are no functions for calling on the player's position, and no way to get that information. BTW big fan of yours Mudbill RE: Teleporting Jolts & Player Position Variables - Wapez - 02-14-2014 You can use if statements and script areas to check where the player is, and then teleport him to different PlayerStartAreas in the hallway depending on what the if statements and script areas return. RE: Teleporting Jolts & Player Position Variables - Horrorable - 02-14-2014 Basically what would be best would be if there was some function like GetEntityPosition("Variable", "variable", "variable") void TeleportPlayer("Variable + 50", "variable + 50", "variable + 50") Where get entity position puts the players xyz coordinates into the variables RE: Teleporting Jolts & Player Position Variables - 7heDubz - 02-14-2014 but there isnt as far as i know, you could make 3 or 4 area and if they walk into that into area a then they get teleported to area a(2) in the second hallway. Fixes the sneaking along the wall problem. RE: Teleporting Jolts & Player Position Variables - Daemian - 02-14-2014 What if the one changing it's the level and not the player? RE: Teleporting Jolts & Player Position Variables - Horrorable - 02-14-2014 (02-14-2014, 10:58 PM)Amn Wrote: What if the one changing it's the level and not the player? Not sure I understand what you mean. Are you suggesting switching the map instead of just moving the player? That wouldn't work because there would be a loading screen. Or do you mean somehow move the map instead of the player? I'm not sure how that would work... (02-14-2014, 04:55 PM)WIWWM Wrote: but there isnt as far as i know, you could make 3 or 4 area and if they walk into that into area a then they get teleported to area a(2) in the second hallway. Fixes the sneaking along the wall problem. Yeah this is what I'm working with right now. There's still a jolt but much smaller. Also if they are midjump during the teleport they suddenly find themselves on the ground again. If no one else can figure out a better way I guess I'll just add a lot of black fog and just hope they don't notice the small jolt from this method. Not sure how to fix the jumping problem. RE: Teleporting Jolts & Player Position Variables - Mudbill - 02-15-2014 You can just disable the jump at that time using SetPlayerJumpDisabled(true); |