How do i change the spawnpoint?

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

How do i change the spawnpoint?

by KingSmarty » Post

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
Location: Germany

by PilzAdam » Post

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).

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

by KingSmarty » 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).
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
Location: Germany

by PilzAdam » Post

KingSmarty wrote:
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).
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
Location: McKinney, Texas U.S.A.
Contact:

by Traxie21 » Post

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

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

by jordan4ibanez » Post

hello, am program. do language in rust. make computer do. okay i go now.

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

by KingSmarty » Post

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
Location: Germany

by PilzAdam » Post

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
Location: 0gb.us:30000
Contact:

by 0gb.us » Post

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
Location: Germany

by PilzAdam » Post

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
Location: Germany

by KingSmarty » Post

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
Location: 0gb.us:30000
Contact:

by 0gb.us » Post

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 » Post

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

sfan5
Moderator
Posts: 4094
Joined: Wed Aug 24, 2011 09:44
GitHub: sfan5
IRC: sfan5
Location: Germany

by sfan5 » Post

Why doesn't anybody look in minetest.conf.example

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/bl ... #L233,L234
Mods: Mesecons | WorldEdit | Nuke & Minetest builds for Windows (32-bit & 64-bit)

User avatar
Evergreen
Member
Posts: 2135
Joined: Sun Jan 06, 2013 01:22
GitHub: 4Evergreen4
IRC: EvergreenTree
In-game: Evergreen
Location: A forest in the midwest
Contact:

by Evergreen » Post

sfan5 wrote:Why doesn't anybody look in minetest.conf.example

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/bl ... #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
Back from the dead!

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

by keyxmakerx » Post

sfan5 wrote:Why doesn't anybody look in minetest.conf.example

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/bl ... #L233,L234
No, I want people to choose their own location.

shaneroach
Member
Posts: 141
Joined: Sat Apr 20, 2013 21:05
Location: Austin, TX
Contact:

by shaneroach » Post

sfan5 wrote:Why doesn't anybody look in minetest.conf.example

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/bl ... #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 » Post

sfan5 wrote:Why doesn't anybody look in minetest.conf.example

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/bl ... #L233,L234
Also I can not find this mine test.conf.example I'm using Linux. Where is it present?

Jordach
Member
Posts: 4534
Joined: Mon Oct 03, 2011 17:58
GitHub: Jordach
IRC: Jordach
In-game: Jordach
Location: Blender Scene

by Jordach » Post

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.

User avatar
Evergreen
Member
Posts: 2135
Joined: Sun Jan 06, 2013 01:22
GitHub: 4Evergreen4
IRC: EvergreenTree
In-game: Evergreen
Location: A forest in the midwest
Contact:

by Evergreen » Post

keyxmakerx wrote:
sfan5 wrote:Why doesn't anybody look in minetest.conf.example

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/bl ... #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.
Back from the dead!

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

by Topywo » Post

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/bl ... nf.example

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

by keyxmakerx » Post

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
Location: Canada

by tinoesroho » Post

... 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: 1721
Joined: Fri May 18, 2012 20:27

by Topywo » Post

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 » Post

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.

Post Reply

Who is online

Users browsing this forum: No registered users and 14 guests