Page 1 of 1

[0.17.18]API: teleport exception

Posted: Tue Mar 26, 2019 8:46 am
by aspd199
API: teleport
When the player is telepport in a entity position, the locked position cannot move.
Log file no error record

Re: [0.17.18]API: teleport exception

Posted: Tue Mar 26, 2019 9:33 am
by posila
Yes, API allows you to do things that might not be percieved as desirable by a player; it is your job to handle undesirable behavior if that is not what you intended to happen.

Re: [0.17.18]API: teleport exception

Posted: Tue Mar 26, 2019 9:52 am
by darkfrei
You are need to find non colliding position before

Code: Select all

new_position = surface.find_non_colliding_position('player', position, 128, 2)

Re: [0.17.18]API: teleport exception

Posted: Wed Mar 27, 2019 2:17 am
by aspd199
well thank you!