Page 1 of 1

Ghost controller saves=crash

Posted: Fri Oct 04, 2013 5:20 pm
by ficolas
When you save the game while with the ghost controller, when you load it, the game crashes.

Re: Ghost controller saves=crash

Posted: Fri Oct 04, 2013 6:03 pm
by Nirahiel
Just curious, what's the ghost controller ?

Re: Ghost controller saves=crash

Posted: Fri Oct 04, 2013 6:11 pm
by ficolas
Nirahiel wrote:Just curious, what's the ghost controller ?
Its like the god mode (the sandbox scenary, no player), but that cant interact with entities.

Re: Ghost controller saves=crash

Posted: Fri Oct 04, 2013 6:36 pm
by Nirahiel
Oh, to make camera effects ?

Re: Ghost controller saves=crash

Posted: Fri Oct 04, 2013 6:39 pm
by ficolas
Nirahiel wrote:Oh, to make camera effects ?
Yea basically, I think is the controller used in the replays

Re: Ghost controller saves=crash

Posted: Sat Oct 05, 2013 11:20 am
by ficolas
Also this seems to crash the game when run (not if done with the console? :S)

Code: Select all

	glob.missile=true
	glob.missilecount=0
	glob.character=game.player.character
	game.player.setcontroller{type=defines.controllers.ghost}
	game.player.controller.teleport(glob.character.position)
	cap=tostring(math.ceil(game.player.controller.position.x))..", "..tostring(math.ceil(game.player.controller.position.y)).."     "..tostring(math.ceil(glob.character.position.x)).."±100, "..tostring(math.ceil(glob.character.position.y)).."±100"
	game.player.gui.center.add({type="frame", name="menus", caption=cap,direction="vertical",style="missile_menu"})
	game.player.gui.center.menus.add({type="button", name="missile", caption=" ",style="inv_button"})
Edit: this is what crashes the game:

Code: Select all

game.player.setcontroller{type=defines.controllers.ghost}
But it doesnt crash it if done with the console... :s

Edit: It also crashes it with the god controller so I guess im doing something wrong...

There is no error message or something, just factorio stop working and ctd

Re: Ghost controller saves=crash

Posted: Sat Oct 05, 2013 11:35 am
by Nirahiel
setcontroller() instead of setcontroller{} ?

Re: Ghost controller saves=crash

Posted: Sat Oct 05, 2013 11:36 am
by ficolas
Nirahiel wrote:setcontroller() instead of setcontroller{} ?
thats the same, when a function needs a table, and just a table you can use {}
Also you would need ({}), not just (), that function asks for a table.

Re: Ghost controller saves=crash

Posted: Sat Oct 05, 2013 11:40 am
by slpwnd
This will be fixed in the 0.7.1.

Re: Ghost controller saves=crash

Posted: Thu Oct 10, 2013 4:46 pm
by ficolas
setcontroller() still seems to crash my game when used on the control.lua :(