Help with map!

Loadable maps as opposed to OldCoder's zoomable maps
yaman
Member
 
Posts: 56
Joined: Wed Sep 04, 2013 21:22

Help with map!

by yaman » Sat Feb 01, 2014 22:16

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?
 

User avatar
PilzAdam
Member
 
Posts: 4026
Joined: Fri Jul 20, 2012 16:19
GitHub: PilzAdam
IRC: PilzAdam

by PilzAdam » Sat Feb 01, 2014 22:21

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.
 

yaman
Member
 
Posts: 56
Joined: Wed Sep 04, 2013 21:22

by yaman » Sun Feb 02, 2014 13:38

thanks very much
 


Return to Minetest Maps

Who is online

Users browsing this forum: No registered users and 36 guests

cron