How do i change the spawnpoint?

User avatar
KingSmarty
Member
 
Posts: 85
Joined: Wed Jan 02, 2013 12:06
GitHub: FsxShader2012
In-game: FsxShader2012

How do i change the spawnpoint?

by KingSmarty » Sun Feb 17, 2013 14:33

Hi there,
I'm trying to make a Hungry Games Map to play with my friends and all time you spawn at 0,0,0 what's un the ground. How do i change the spawnpoint?
 

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

by PilzAdam » Sun Feb 17, 2013 14:40

Simple mod for that:
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)

Put this in [your_world_name]/worldmods/respawn/init.lua (you can use a different modname if you want to).
 

User avatar
KingSmarty
Member
 
Posts: 85
Joined: Wed Jan 02, 2013 12:06
GitHub: FsxShader2012
In-game: FsxShader2012

by KingSmarty » Sun Feb 17, 2013 15:05

PilzAdam wrote:Simple mod for that:
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)

Put this in [your_world_name]/worldmods/respawn/init.lua (you can use a different modname if you want to).

Does this only Works on respawn or on spawn to? Or Must i use:
minetest.register_on_spawnplayer....
 

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

by PilzAdam » Sun Feb 17, 2013 15:17

KingSmarty wrote:
PilzAdam wrote:Simple mod for that:
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)

Put this in [your_world_name]/worldmods/respawn/init.lua (you can use a different modname if you want to).

Does this only Works on respawn or on spawn to? Or Must i use:
minetest.register_on_spawnplayer....

It should work for new players too.
 

User avatar
Traxie21
Member
 
Posts: 753
Joined: Mon Dec 31, 2012 10:48

by Traxie21 » Sun Feb 17, 2013 15:20

You could use my ServerExtended mod and enable the admin tools module, which contains /setspawn.
 

User avatar
jordan4ibanez
Member
 
Posts: 1865
Joined: Tue Sep 27, 2011 18:44
GitHub: jordan4ibanez
IRC: jordan4ibanez
In-game: jordan4ibanez

by jordan4ibanez » Sun Feb 17, 2013 20:10

If you can think it, you can make it.
 

User avatar
KingSmarty
Member
 
Posts: 85
Joined: Wed Jan 02, 2013 12:06
GitHub: FsxShader2012
In-game: FsxShader2012

by KingSmarty » Sun Feb 17, 2013 21:11

Thx to ALL of u !
I'm currently using Traxies Mod and that is awsome.
@jordan i will try urs too ;)
@PilzAdam what worldmods Folder do you mean?
Last edited by KingSmarty on Sun Feb 17, 2013 21:13, edited 1 time in total.
 

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

by PilzAdam » Mon Feb 18, 2013 07:09

KingSmarty wrote:Thx to ALL of u !
I'm currently using Traxies Mod and that is awsome.
@jordan i will try urs too ;)
@PilzAdam what worldmods Folder do you mean?

If a worldmods/ folder is in your world mods from there are loaded too. So you can create worlds wich use some special mods (for adventure maps etc.).
 

User avatar
0gb.us
Member
 
Posts: 841
Joined: Sun Sep 16, 2012 01:55

by 0gb.us » Mon Feb 18, 2013 12:04

There's no particular reason to write extra code for this. The built-in scripts have it covered. Just add a setting to your conf file.

static_spawnpoint = 7.5,7.5,7.5
 

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

by PilzAdam » Mon Feb 18, 2013 16:17

0gb.us wrote:There's no particular reason to write extra code for this. The built-in scripts have it covered. Just add a setting to your conf file.

static_spawnpoint = 7.5,7.5,7.5

The problem with this is that its in minetest.conf, so not in a per world setting.
My simple script (see above) in worldmods/ would be only for the hungry games map.
 

User avatar
KingSmarty
Member
 
Posts: 85
Joined: Wed Jan 02, 2013 12:06
GitHub: FsxShader2012
In-game: FsxShader2012

by KingSmarty » Mon Feb 18, 2013 17:25

PilzAdam wrote:
0gb.us wrote:There's no particular reason to write extra code for this. The built-in scripts have it covered. Just add a setting to your conf file.

static_spawnpoint = 7.5,7.5,7.5

The problem with this is that its in minetest.conf, so not in a per world setting.
My simple script (see above) in worldmods/ would be only for the hungry games map.

I tired to set the static spawnpoint setting into the config but it didn't work.
 

User avatar
0gb.us
Member
 
Posts: 841
Joined: Sun Sep 16, 2012 01:55

by 0gb.us » Tue Feb 19, 2013 22:39

PilzAdam wrote:
0gb.us wrote:There's no particular reason to write extra code for this. The built-in scripts have it covered. Just add a setting to your conf file.

static_spawnpoint = 7.5,7.5,7.5

The problem with this is that its in minetest.conf, so not in a per world setting.
My simple script (see above) in worldmods/ would be only for the hungry games map.


Different worlds have different setups. Why would you not use a separate conf file for each world?

Like conf files, that code could be used in only one world, or in all of them, depending on how you set things up.

KingSmarty wrote:I tired to set the static spawnpoint setting into the config but it didn't work.


Maybe other code is interfering with it (such as the code above). By default though, it should work.
Last edited by 0gb.us on Tue Feb 19, 2013 22:40, edited 1 time in total.
 

keyxmakerx
Member
 
Posts: 104
Joined: Mon Apr 08, 2013 23:53

by keyxmakerx » Sun May 26, 2013 03:44

What if we want people to be able to choose a spawn position, but have a static spawn on account creation?
 

User avatar
sfan5
Member
 
Posts: 3636
Joined: Wed Aug 24, 2011 09:44
GitHub: sfan5
IRC: sfan5

by sfan5 » Sun May 26, 2013 06:42

Why doesn't anybody look in minetest.conf.example
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
# If this is set, players will always (re)spawn at the given position
#static_spawnpoint = 0, 10, 0

https://github.com/minetest/minetest/blob/master/minetest.conf.example#L233,L234
Mods: Mesecons | WorldEdit | Nuke
Minetest builds for Windows (32-bit & 64-bit)
 

User avatar
Evergreen
Member
 
Posts: 2131
Joined: Sun Jan 06, 2013 01:22
GitHub: 4Evergreen4
IRC: EvergreenTree
In-game: Evergreen

by Evergreen » Sun May 26, 2013 11:09

sfan5 wrote:Why doesn't anybody look in minetest.conf.example
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
# If this is set, players will always (re)spawn at the given position
#static_spawnpoint = 0, 10, 0

https://github.com/minetest/minetest/blob/master/minetest.conf.example#L233,L234

I do. I wouldn't know how to do half the stuff with it that I do now if there wasn't the conf example. :P
"Help! I searched for a mod but I couldn't find it!"
http://krock-works.16mb.com/MTstuff/modSearch.php
 

keyxmakerx
Member
 
Posts: 104
Joined: Mon Apr 08, 2013 23:53

by keyxmakerx » Mon May 27, 2013 17:39

sfan5 wrote:Why doesn't anybody look in minetest.conf.example
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
# If this is set, players will always (re)spawn at the given position
#static_spawnpoint = 0, 10, 0

https://github.com/minetest/minetest/blob/master/minetest.conf.example#L233,L234

No, I want people to choose their own location.
 

shaneroach
Member
 
Posts: 141
Joined: Sat Apr 20, 2013 21:05

by shaneroach » Mon May 27, 2013 21:36

sfan5 wrote:Why doesn't anybody look in minetest.conf.example
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
# If this is set, players will always (re)spawn at the given position
#static_spawnpoint = 0, 10, 0

https://github.com/minetest/minetest/blob/master/minetest.conf.example#L233,L234


Depending on someone's technical experience, conf files can be fairly difficult to decipher. Even just getting past the wall of spam they present can be intimidating for new users who are not experienced with such things.
In order to change yourself, you must believe the change is possible and that there are rewards for making the change.
- Inspired by Hebrews 11:6
 

keyxmakerx
Member
 
Posts: 104
Joined: Mon Apr 08, 2013 23:53

by keyxmakerx » Wed May 29, 2013 11:19

sfan5 wrote:Why doesn't anybody look in minetest.conf.example
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
# If this is set, players will always (re)spawn at the given position
#static_spawnpoint = 0, 10, 0

https://github.com/minetest/minetest/blob/master/minetest.conf.example#L233,L234


Also I can not find this mine test.conf.example I'm using Linux. Where is it present?
 

User avatar
Jordach
Member
 
Posts: 4412
Joined: Mon Oct 03, 2011 17:58
GitHub: Jordach
IRC: Jordach
In-game: Jordach

by Jordach » Wed May 29, 2013 11:42

In the base dir of a run in place build, like the windows builds.

If you used apt-get, or similar, then it doesnt exist.

( ͡° ͜ʖ ͡°) ( ͡o ͜ʖ ͡o) [$ ( ͡° ͜ʖ ͡°) $] ( ͡$ ͜ʖ ͡$) ヽ༼ຈل͜ຈ༽ノ



My image and media server is back online and is functioning as normal.
 

User avatar
Evergreen
Member
 
Posts: 2131
Joined: Sun Jan 06, 2013 01:22
GitHub: 4Evergreen4
IRC: EvergreenTree
In-game: Evergreen

by Evergreen » Wed May 29, 2013 11:56

keyxmakerx wrote:
sfan5 wrote:Why doesn't anybody look in minetest.conf.example
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
# If this is set, players will always (re)spawn at the given position
#static_spawnpoint = 0, 10, 0

https://github.com/minetest/minetest/blob/master/minetest.conf.example#L233,L234


Also I can not find this mine test.conf.example I'm using Linux. Where is it present?

You won't be able to find it unless you compiled it from github.
"Help! I searched for a mod but I couldn't find it!"
http://krock-works.16mb.com/MTstuff/modSearch.php
 

User avatar
Topywo
Member
 
Posts: 1718
Joined: Fri May 18, 2012 20:27

by Topywo » Wed May 29, 2013 14:51

Link to the Github minetest.conf.example. You can use copy/paste (to minetest.conf). To get a line working remove the #.

https://github.com/minetest/minetest/blob/master/minetest.conf.example
 

keyxmakerx
Member
 
Posts: 104
Joined: Mon Apr 08, 2013 23:53

by keyxmakerx » Wed Jun 05, 2013 23:05

Ok that's kewl, but what about if I want people to be able to set their own locations?
 

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

by tinoesroho » Thu Jun 06, 2013 04:52

... Install the beds, and then they can set it by sleeping in one. Or the bookmarks mod- just use that search function up at the top.
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
Topywo
Member
 
Posts: 1718
Joined: Fri May 18, 2012 20:27

by Topywo » Thu Jun 06, 2013 08:32

This is a link to the sethome mod:

http://forum.minetest.net/viewtopic.php?id=741

When the search function generates too much results, you can use the advanced search and limit the search to only released mods and general modding.
 

keyxmakerx
Member
 
Posts: 104
Joined: Mon Apr 08, 2013 23:53

by keyxmakerx » Mon Jun 10, 2013 07:20

Topywo wrote:This is a link to the sethome mod:

http://forum.minetest.net/viewtopic.php?id=741

When the search function generates too much results, you can use the advanced search and limit the search to only released mods and general modding.


I know, but this mod isn't a spawn point, and the beds mod didn't work for me.
Last edited by keyxmakerx on Mon Jun 10, 2013 07:21, edited 1 time in total.
 

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

by tinoesroho » Mon Jun 10, 2013 19:09

... 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: 946
Joined: Mon Aug 04, 2014 14:27
GitHub: maikerumine
In-game: maikerumine

Re:

by maikerumine » Sat Nov 15, 2014 19:57

PilzAdam wrote:Simple mod for that:
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)

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?
 

User avatar
kaeza
Member
 
Posts: 2141
Joined: Thu Oct 18, 2012 05:00
GitHub: kaeza
IRC: kaeza diemartin blaaaaargh
In-game: kaeza

Re: How do i change the spawnpoint?

by kaeza » Sat Nov 15, 2014 19:59

You don't need a mod for that.

Add this line to `minetest.conf`:
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
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 | BTC: 1DFZAa5VtNG7Levux4oP6BuUzr1e83pJK2
 

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

Re: How do i change the spawnpoint?

by maikerumine » Sat Nov 15, 2014 21:27

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

Add this line to `minetest.conf`:
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
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.
 

User avatar
Krock
Member
 
Posts: 3598
Joined: Thu Oct 03, 2013 07:48
GitHub: SmallJoker

Re: How do i change the spawnpoint?

by Krock » Sat Nov 15, 2014 21:32

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
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.setting_set("static_spawnpoint", "X, Y, Z")
Newest Win32 builds - Find a mod - All my mods
ALL YOUR DONATION ARE BELONG TO PARAMAT (Please support him and Minetest)
New DuckDuckGo !bang: !mtmod <keyword here>
 

Next

Return to Minetest General

Who is online

Users browsing this forum: Bing [Bot] and 38 guests

cron