Facebook Twitter YouTube Frictional Games | Forum | Privacy Policy | Dev Blog | Dev Wiki | Support | Gametee


Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Relative teleport
GraphicsKid Offline
Senior Member

Posts: 258
Threads: 34
Joined: Dec 2010
Reputation: 3
#1
Relative teleport

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?
01-12-2011, 09:16 AM
Find
jens Offline
Frictional Games

Posts: 4,093
Threads: 199
Joined: Apr 2006
Reputation: 202
#2
RE: Relative teleport

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.
01-12-2011, 11:35 AM
Website Find
GraphicsKid Offline
Senior Member

Posts: 258
Threads: 34
Joined: Dec 2010
Reputation: 3
#3
RE: Relative teleport

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
01-13-2011, 12:26 AM
Find
thePyro13 Offline
Junior Member

Posts: 24
Threads: 0
Joined: Sep 2010
Reputation: 0
#4
RE: Relative teleport

(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.
(This post was last modified: 01-13-2011, 02:09 PM by thePyro13.)
01-13-2011, 02:04 PM
Find
Frontcannon Offline
Senior Member

Posts: 538
Threads: 10
Joined: Jul 2010
Reputation: 2
#5
RE: Relative teleport

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

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

That's basically all you do.


╔═════════════════╗
☺ Smoke weed everyday ☺
╚═════════════════╝
01-13-2011, 02:54 PM
Find
GraphicsKid Offline
Senior Member

Posts: 258
Threads: 34
Joined: Dec 2010
Reputation: 3
#6
RE: Relative teleport

(01-13-2011, 02:54 PM)Frontcannon Wrote:
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?
01-14-2011, 08:10 PM
Find
Frontcannon Offline
Senior Member

Posts: 538
Threads: 10
Joined: Jul 2010
Reputation: 2
#7
RE: Relative teleport

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.


╔═════════════════╗
☺ Smoke weed everyday ☺
╚═════════════════╝
(This post was last modified: 01-14-2011, 09:22 PM by Frontcannon.)
01-14-2011, 09:21 PM
Find
GraphicsKid Offline
Senior Member

Posts: 258
Threads: 34
Joined: Dec 2010
Reputation: 3
#8
RE: Relative teleport

(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.
01-14-2011, 11:47 PM
Find
Frontcannon Offline
Senior Member

Posts: 538
Threads: 10
Joined: Jul 2010
Reputation: 2
#9
RE: Relative teleport

(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.


╔═════════════════╗
☺ Smoke weed everyday ☺
╚═════════════════╝
01-14-2011, 11:58 PM
Find
xiphirx Offline
Senior Member

Posts: 662
Threads: 16
Joined: Nov 2010
Reputation: 5
#10
RE: Relative teleport

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

01-15-2011, 12:52 AM
Find




Users browsing this thread: 1 Guest(s)