Frictional Games Forum (read-only)
Relative teleport - 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 (https://www.frictionalgames.com/forum/forum-35.html)
+--- Thread: Relative teleport (/thread-6177.html)

Pages: 1 2


Relative teleport - GraphicsKid - 01-12-2011

Is there a way to move the player instantly but not just to a fixed location but for instance -10 units along the y axis?


RE: Relative teleport - jens - 01-12-2011

No but you can make a series of areas that the player collides with and then you teleport the player to a start location for what area he is currently in.


RE: Relative teleport - GraphicsKid - 01-13-2011

Aww darn... the idea was that I'd make a long hallway where in the middle, you couldn't see the ends. The walls are very repetitive, and if you haven't completed a puzzle, it'll keep knocking you back a distance (a distance equal to the tiling size of each wall piece, so the player won't notice they've been knocked back) so the hallway will seem infinite.

Sounds like I can't do this now. Sad


RE: Relative teleport - thePyro13 - 01-13-2011

(01-13-2011, 12:26 AM)GraphicsKid Wrote: Aww darn... the idea was that I'd make a long hallway where in the middle, you couldn't see the ends. The walls are very repetitive, and if you haven't completed a puzzle, it'll keep knocking you back a distance (a distance equal to the tiling size of each wall piece, so the player won't notice they've been knocked back) so the hallway will seem infinite.

Sounds like I can't do this now. Sad

Sounds like a sequence from Mario 64.

I wanted to make something like this as well, just make sure the point that the teleport point sends you to a start location near the bottom of the stairs. And make sure both points line up to the tessellation point of the wall texture so that players wont notice.

It'll be pretty obvious if the player is walking backwards when they are teleported though. You'll probably have to cover the ends of the stairs with a liberal amount of fog to make it really seamless, since you cannot control which way the player will be looking when they are teleported(like the mario example).

I think i'll give a try at making a small map that does this over the weekend.


RE: Relative teleport - Frontcannon - 01-13-2011

Code:
AddEntityCollideCallback("Player", "TeleportCollideArea", "EndlessTeleport", false, 1);

void EndlessTeleport(string &in asParent, string &in asChild, int alState)
{
    TeleportPlayer("TeleportArea");
}

That's basically all you do.


RE: Relative teleport - GraphicsKid - 01-14-2011

(01-13-2011, 02:54 PM)Frontcannon Wrote:
Code:
AddEntityCollideCallback("Player", "TeleportCollideArea", "EndlessTeleport", false, 1);

void EndlessTeleport(string &in asParent, string &in asChild, int alState)
{
    TeleportPlayer("TeleportArea");
}

That's basically all you do.

Nah that doesn't work. I mean it "works", but the player knows when they've teleported. The idea is to make an infinite hallway, but to do this, you just keep teleporting them backwards but so they don't notice they've teleported.

@thePyro
Yea that's where I got the idea from. About them turning around, this would be a pitch black hallway, and all they've have was their lantern. If they turned around, all they'd see were the walls, ceiling, and floor, the darkness blotting out the corner they turned to get into the hallway. It's a pretty long hallway on it's own.

Perhaps though... maybe if I made enough area triggers, enough thin little slices, maybe the player wouldn't notice the teleport... what does it take to activate an area? Does the players origin enter it, or is it when the cylinder bounding the player collides with the area box?


RE: Relative teleport - Frontcannon - 01-14-2011

Just put the teleport area one tiling distance back from the collide area, but I think the player would have to look straight down the hallway to make this look good.


RE: Relative teleport - GraphicsKid - 01-14-2011

(01-14-2011, 09:21 PM)Frontcannon Wrote: Just put the teleport area one tiling distance back from the collide area, but I think the player would have to look straight down the hallway to make this look good.

Yea that's the problem... I know the player will notice that they've suddenly hopped left or right... but I wonder if I can divide up the area into a bunch of thin little slices so the jump is less noticeable.....

Also... is the teleport seamless on its own? I mean... I don't want Daniel to make a grunting sound or have his hands jump up or anything... nothing to indicate that the teleport has occurred.


RE: Relative teleport - Frontcannon - 01-14-2011

(01-14-2011, 11:47 PM)GraphicsKid Wrote: Yea that's the problem... I know the player will notice that they've suddenly hopped left or right... but I wonder if I can divide up the area into a bunch of thin little slices so the jump is less noticeable.....

Teleporting is instant, no transition at all.

Maybe make the hallway very narrow until the player can't move left or right? Or make the hallway have light and very dark areas, use one of them to teleport the player (better disable the lantern for this) there so he can't see it.
It is possible, you've just gotta work around it.


RE: Relative teleport - xiphirx - 01-15-2011

You sure you can't set the teleport offsets? or does it just move daniel to the center of the area?