Page 1 of 1

Help with map!

PostPosted: Sat Feb 01, 2014 22:16
by yaman
I am making an adventure map, but I need the player to spawn a certain place if they die. How do you set a spawnpoint?

PostPosted: Sat Feb 01, 2014 22:21
by PilzAdam
I guess the best thing would be a simple worldmod:
Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
Code: Select all
minetest.register_on_respawnplayer(function(player)
    player:setpos({x=0, y=0, z=0})
    return true
end)

Create a folder "worldmods" in the world directory. Inside of this new folder create the folder "respawn" and paste the code in "init.lua". Then adjust the position and you are done.

PostPosted: Sun Feb 02, 2014 13:38
by yaman
thanks very much