Page 1 of 1

[2.0.14] player.teleport doesn't work when inside of a cargo-pod/rocket if teleporting to the same surface

Posted: Fri Nov 08, 2024 1:13 am
by Oarc
player.teleport works, when the player is dropping in a cargo-pod, if I teleport to a different surface.
However, it does NOT work when trying to teleport to the same surface the cargo-pod is currently dropping on.

Same for taking off in a rocket.

Seems like an inconsistency or bug maybe?


Steps to repro:

1. Start a freeplay game, cheat to make sure another planet surfaces is available first.
2. Setup a rocket, get in.
3. Test teleport command:

Code: Select all

/c game.player.teleport({0,0}, game.surfaces["nauvis"])
4. Teleport command WORKS if surface is different than the one the cargo-pod/rocket is currently on, but not if it is the same.

Expectation: Teleport command should work in all cases (or do the same thing in all cases).

Re: [2.0.14] player.teleport doesn't work when inside of a cargo-pod/rocket if teleporting to the same surface

Posted: Fri Nov 08, 2024 7:10 pm
by Rseding91
Thanks for the report. This works the same as when in a vehicle, or spidertron. The entity the character is in constantly moves the character to the position of itself. If you don't want that behavior, you can eject the player from the thing it's riding in before teleporting them. Or teleport the vehicle they're in instead of them.

Re: [2.0.14] player.teleport doesn't work when inside of a cargo-pod/rocket if teleporting to the same surface

Posted: Sun Nov 10, 2024 2:49 pm
by Oarc
Ah okay, but it seems like setting driving=false doesn't kick the player out of the cargo-pod. Is that a separate bug then or working as intended?
How do we get the player out of the cargo-pod without having to have an intermediate surface to put them on first?

Edit: if anyone sees this, it was resolved here: viewtopic.php?f=30&t=121014