Page 1 of 1

Cannot save map. There is no player - how to deal with it?

Posted: Thu Jun 12, 2014 8:08 pm
by TOMII
Hello

Like i mentioned in the topic name, I have a problem with creating a map for sandbox play.
I cant save it unless I place a player but then its not a free sandbox anymore ;/
Is there a way to go around it?

Thanks!

Re: Cannot save map. There is no player - how to deal with i

Posted: Thu Jun 12, 2014 8:18 pm
by FreeER
add a player, then create a control.lua file manually within the scenario folder and add

Code: Select all

game.oninit(function()
  local character = game.player.character
  if character then character.destroy() end
  game.player.setcontroller{type=defines.controllers.god}
end)
that should place you in god mode (in fact it's the same code that the devs used in the sandbox control.lua).

Re: Cannot save map. There is no player - how to deal with i

Posted: Thu Jun 12, 2014 8:30 pm
by TOMII
It worked!
Thank you :)