Observer mode in Multiplayer

Anything that prevents you from playing the game properly. Do you have issues playing for the game, downloading it or successfully running it on your computer? Let us know here.
Caledorn
Burner Inserter
Burner Inserter
Posts: 18
Joined: Tue Feb 21, 2017 10:29 pm
Contact:

Observer mode in Multiplayer

Post by Caledorn »

Hey!

So, I've found out how you can take over another player's body and items through using the LUA console, which was funny, and slightly creepy - but not exactly what I was looking to do. So I figured I'd ask here in the forums for what I would like to do.

Is there a way that you can go into ghost mode, and then use a command to follow another player around, so you see the game from their perspective when they're moving around the map? Kind of a ghost-follow mode? :-)

- Caledorn
User avatar
prg
Filter Inserter
Filter Inserter
Posts: 947
Joined: Mon Jan 19, 2015 12:39 am
Contact:

Re: Observer mode in Multiplayer

Post by prg »

Something like

Code: Select all

/c game.player.character=nil script.on_event(defines.events.on_tick, function(event) game.players[2].teleport(game.players[1].position) end)
(adjust player numbers to taste)
Automatic Belt (and pipe) Planner—Automate yet another aspect of constructing your factory!
Caledorn
Burner Inserter
Burner Inserter
Posts: 18
Joined: Tue Feb 21, 2017 10:29 pm
Contact:

Re: Observer mode in Multiplayer

Post by Caledorn »

prg wrote:Something like

Code: Select all

/c game.player.character=nil script.on_event(defines.events.on_tick, function(event) game.players[2].teleport(game.players[1].position) end)
(adjust player numbers to taste)
Sorry for the late response - but thank you very, very much! That worked wonderfully!

For the record you can also replace game.players[2] etc with game.players["player_nickname"], if you don't know a player's ID. :-)
Post Reply

Return to “Technical Help”