• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

push insted of teleport ?

gritness

Member
Joined
May 26, 2021
Messages
33
Reaction score
6
Hey All,

Someone knows how to push player into doors instead of teleportTo ?? exist any function for this?

below is part of my code, it works but i want to push player - it looks better

Lua:
if player:getStorageValue(storage_id3) == 2 and item:getUniqueId() == unique_idDOOR3 then
            player:teleportTo(fromPosition)       --   here need push
            item:transform(1259 + 1)
 
Last edited by a moderator:
Solution
C++:
creature:teleportTo(position[, pushMovement = false])
If you send true as the second parameter after the position, the creature will act as if it has been pushed, as long as the distance between the positions is 1

with false
player:teleportTo(position, false)
GIF 30-05-2021 03-40-21 p. m..gif

with true
player:teleportTo(position, true)

GIF 30-05-2021 03-40-36 p. m..gif
C++:
creature:teleportTo(position[, pushMovement = false])
If you send true as the second parameter after the position, the creature will act as if it has been pushed, as long as the distance between the positions is 1

with false
player:teleportTo(position, false)
GIF 30-05-2021 03-40-21 p. m..gif

with true
player:teleportTo(position, true)

GIF 30-05-2021 03-40-36 p. m..gif
 
Solution
Back
Top