How do i change the spawnpoint?

tinoesroho
Member
Posts: 570
Joined: Fri Feb 17, 2012 21:55
Location: Canada

by tinoesroho » Post

... it should be possible to change sethome from parsing a chat command to parsing when a player dies- and then respawn where the player had typed /sethome.
We are what we create.

I tinker and occasionally make (lousy) mods. Currently building an MMO subgame and updating mods. Pirate Party of Canada member. Sporadic author. 21 years old.

My github:
https://github.com/tinoesroho/

User avatar
maikerumine
Member
Posts: 1420
Joined: Mon Aug 04, 2014 14:27
GitHub: maikerumine
In-game: maikerumine

Re:

by maikerumine » Post

PilzAdam wrote:Simple mod for that:

Code: Select all

minetest.register_on_respawnplayer(function(player)
    player:setpos({x=0, y=0, z=0})
    return true
end)
Put this in [your_world_name]/worldmods/respawn/init.lua (you can use a different modname if you want to).
I know this is a very old post, but I have been searching the web and the forum for a few hours now and cannot seem to find a simple mod that overrides the default minetest.conf file.

What I am looking for is a mod I can easily add to a map that sets the player start point where I choose in the file. i tried the code above and did exactly what it says, naming and all, but it is not working. Is it possible there is another code or mod around that I have not found yet?
Talamh Survival Minetest-->viewtopic.php?f=10&t=12959

User avatar
kaeza
Moderator
Posts: 2162
Joined: Thu Oct 18, 2012 05:00
GitHub: kaeza
IRC: kaeza diemartin blaaaaargh
In-game: kaeza
Location: Montevideo, Uruguay
Contact:

Re: How do i change the spawnpoint?

by kaeza » Post

You don't need a mod for that.

Add this line to `minetest.conf`:

Code: Select all

static_spawnpoint = X, Y, Z
Your signature is not the place for a blog post. Please keep it as concise as possible. Thank you!

Check out my stuff! | Donations greatly appreciated! PayPal

User avatar
maikerumine
Member
Posts: 1420
Joined: Mon Aug 04, 2014 14:27
GitHub: maikerumine
In-game: maikerumine

Re: How do i change the spawnpoint?

by maikerumine » Post

kaeza wrote:You don't need a mod for that.

Add this line to `minetest.conf`:

Code: Select all

static_spawnpoint = X, Y, Z
Thank you. Will this change all worlds loaded? I wanted to have individual maps with different start points e.g. space station map, skybox map, underground cavern map.
Talamh Survival Minetest-->viewtopic.php?f=10&t=12959

User avatar
Krock
Developer
Posts: 4650
Joined: Thu Oct 03, 2013 07:48
GitHub: SmallJoker
Location: Switzerland
Contact:

Re: How do i change the spawnpoint?

by Krock » Post

maikerumine wrote:Thank you. Will this change all worlds loaded? I wanted to have individual maps with different start points e.g. space station map, skybox map, underground cavern map.
It will change for all worlds. If you want specific spawn points, use the Lua function

Code: Select all

minetest.setting_set("static_spawnpoint", "X, Y, Z")
Look, I programmed a bug for you. >> Mod Search Engine << - Mods by Krock - DuckDuckGo mod search bang: !mtmod <keyword here>

User avatar
maikerumine
Member
Posts: 1420
Joined: Mon Aug 04, 2014 14:27
GitHub: maikerumine
In-game: maikerumine

Re: How do i change the spawnpoint?

by maikerumine » Post

Krock wrote:
maikerumine wrote:Thank you. Will this change all worlds loaded? I wanted to have individual maps with different start points e.g. space station map, skybox map, underground cavern map.
It will change for all worlds. If you want specific spawn points, use the Lua function

Code: Select all

minetest.setting_set("static_spawnpoint", "X, Y, Z")
BOOM!
viewtopic.php?t=6890
I finally found it!! THANK YOU!!!!!!

[EDIT: Just saw the license ND. lame.]
Talamh Survival Minetest-->viewtopic.php?f=10&t=12959

User avatar
octacian
Member
Posts: 597
Joined: Mon Dec 21, 2015 22:18
GitHub: octacian
IRC: octacian
In-game: octacian
Location: Canada

Re: How do i change the spawnpoint?

by octacian » Post

Now, I know this post is super, SUPER, SUPER old, but, for those of you who might still be interested in a good mod to allow you to easily change the spawnpoint, take a look at my latest mod, appropriately named: SpawnPoint!

Anyways, I hope it's helpful! lol
MicroExpansion, Working Computers, All Projects - Check out my YouTube channel! (octacian)
I'm currently inactive in the Minetest community! So if I don't respond, that's why.

Post Reply

Who is online

Users browsing this forum: No registered users and 44 guests