TheLastOrder wrote:How can I teleport to its original starting point a pushable block through a button?
I want to avoid that a player reaches a dead end where the puzzle can´t be solved... because all pushable blockers could be blocking each others.
Thanks in advance guys!
Code: Select all
function resetBlock()
--change "pushable_block_floor_1" to the Id of the floor tile you want your block to reset onto
local pos = pushable_block_floor_1:getWorldPosition()
--change "pushable_block_1" to the ID of your pushable block
local b = pushable_block_1
spawn("teleportation_effect",b.level,b.x,b.y,b.facing,b.elevation)
b:setWorldPosition(pos)
spawn("teleportation_effect",b.level,b.x,b.y,b.facing,b.elevation)
end