Spawn Control


Adds a button to set your spawn point.

Utilities
3 years ago
0.16 - 1.1
2.87K

g [Fixed] Does not work well with multiplayer.

5 years ago

All player's spawn is set to the same location when pressing spawnpoint button.

5 years ago

Interesting it should not do that. What other mods are you using?

The mods is based on "event.player_index" so I don't see why it would effect all players.

Any other details would be great.

4 years ago

Spawn points are tied to forces, and not individual players. In a typical multiplayer game, all players are on the same players force. In PVP servers with multiple "teams", this would mean that all players on a given force would share a spawn point as well.

The method for setting spawn points belongs to the LuaForce class, specifically set_spawn_position, which you have used in your set_spawn function.

As far as I know, there is no way in the API as it stands to set the spawn point for an individual player. The only workaround to achieve this that I can think of would be to implicitly create a force for each player when attempting to set "their" spawn point.

3 years ago

Wow, I never responded to this after the fix. All locations are stored in a new variable stored in the map. On re-spawn it checks who died and teleport to the correct location.

New response