First issue setup: Place a tank on Nauvis, and go to another planet (say, Fulgora).
Run this in the console:
Code: Select all
/c local tank = game.surfaces["nauvis"].find_entities_filtered({name = "tank"})[1] tank.set_driver(game.player)
Second issue setup: Place a tank and a spidertron on Nauvis.
Run this:
Code: Select all
/c local tank = game.surfaces["nauvis"].find_entities_filtered({name = "tank"})[1]
game.player.set_controller({type = defines.controllers.remote, surface=tank.surface})
tank.set_driver(game.player)
Run this:
Code: Select all
/c local spider = game.surfaces["nauvis"].find_entities_filtered({name = "spidertron"})[1]
game.player.set_controller({type = defines.controllers.remote, surface=spider.surface})
spider.set_driver(game.player)
It works properly without the "Switch to map view" step, letting you directly swap between remote driving the two vehicles. The "surface" parameter to set_controller is also important - leaving that out allows it to work properly.