How do i change the spawnpoint?

User avatar
KingSmarty
Member
 
Posts: 85
Joined: Wed Jan 02, 2013 12:06
Location: Germany
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
Location: Germany
GitHub: PilzAdam
IRC: PilzAdam

by PilzAdam » Sun Feb 17, 2013 14:40

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
Location: Germany
GitHub: FsxShader2012
In-game: FsxShader2012

by KingSmarty » Sun Feb 17, 2013 15:05

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
Location: Germany
GitHub: PilzAdam
IRC: PilzAdam

by PilzAdam » Sun Feb 17, 2013 15:17

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.

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: 1893
Joined: Tue Sep 27, 2011 18:44
Location: Rhode Island, USA
GitHub: jordan4ibanez
IRC: jordan4ibanez
In-game: jordan4ibanez
 

User avatar
KingSmarty
Member
 
Posts: 85
Joined: Wed Jan 02, 2013 12:06
Location: Germany
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
Location: Germany
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
Location: 0gb.us:30000

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

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
Moderator
 
Posts: 3741
Joined: Wed Aug 24, 2011 09:44
Location: Germany
GitHub: sfan5
IRC: sfan5

by sfan5 » Sun May 26, 2013 06:42

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/blob/master/minetest.conf.example#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
Location: A forest in the midwest
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
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
Back from the dead!
 

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
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
Location: Austin, TX

by shaneroach » Mon May 27, 2013 21:36

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/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
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: 4482
Joined: Mon Oct 03, 2011 17:58
Location: Blender Scene
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.
viewtopic.php?f=10&t=19056 Solar Plains Dev Server
 

User avatar
Evergreen
Member
 
Posts: 2135
Joined: Sun Jan 06, 2013 01:22
Location: A forest in the midwest
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
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.
Back from the dead!
 

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

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.
 

Next

Return to General Discussion



Who is online

Users browsing this forum: anastazieb and 2 guests