Page 1 of 1

God mode to player mode

Posted: Sun Sep 13, 2015 10:56 am
by omicronus
Hello,

Okay so I've searched Google for this problem naturally. Using version 0.12.6 with Bobs mods, autofill, morelight, landfill. I've basically created a map. Played it as a character. Then decided to do some changes, so edited the map and now when I load it up I'm just a God thingy. I tried a few commands I've seen from Reddit such as /c game.players[1].character = game.createentity({name="player", position={0,0}}) in lua command console but just comes back as 'LuaGameScript doesn't contain key createentity

Am I doing something wrong here? Is that even right? Tried looking on the wiki but it's a blank page for some reason.

Any help appreciated!

Re: God mode to player mode

Posted: Sun Sep 13, 2015 11:02 am
by prg
Not sure if it will help in your case, but in 0.12 underscores got added everywhere so it's now create_entity.

Re: God mode to player mode

Posted: Sun Sep 13, 2015 11:09 am
by omicronus
Thanks but just tried that and still says the same; 'LuaGameScript doesn't contain key create_entity.'

Re: God mode to player mode

Posted: Sun Sep 13, 2015 11:13 am
by prg
Oh, right. Also in 0.12, different surfaces were introduced, so try something like

Code: Select all

/c game.players[1].character = game.surfaces.nauvis.create_entity({name="player", position={0,0}})

Re: God mode to player mode

Posted: Sun Sep 13, 2015 11:23 am
by omicronus
Thank you! That worked! Except now I can't pick up anything, says 'Can't open enemy structures'. Anyway to fix that?

Re: God mode to player mode

Posted: Sun Sep 13, 2015 11:26 am
by prg
Try /c game.player.force="player"

Re: God mode to player mode

Posted: Sun Sep 13, 2015 11:33 am
by Klonan
Or try

Code: Select all

/c game.local_player.force = game.forces.player 

Re: God mode to player mode

Posted: Sun Sep 13, 2015 11:36 am
by omicronus
Thanks so much! Appreciate the help! Just need to reset my research now since my toolbelt is back to one bar again.

But thanks again! :D