Page 1 of 1

From ghost to character or from god to character.

Posted: Sun Sep 29, 2013 1:51 pm
by ficolas
Is it possible to change the controller from gost to character and/or from god to character?

I tried

Code: Select all

game.player.setcontroller{type=defines.controllers.god}
and the player is still there, because I havent removed it, and then I tried doing

Code: Select all

game.player.setcontroller{type=defines.controllers.character}
but it says 'setcontroller table expected, got nil'

I also tried to save the character in a variable to then do game.player.character=character and set the controller, but game.player.character is readonly

Also where is the ghost controller used? in the replay?

Re: From ghost to character or from god to character.

Posted: Sun Sep 29, 2013 3:46 pm
by rk84

Re: From ghost to character or from god to character.

Posted: Sun Sep 29, 2013 4:31 pm
by ficolas
Sorry didnt remember about that post but I have read it.

Re: From ghost to character or from god to character.

Posted: Sun Sep 29, 2013 4:40 pm
by rk84
ficolas wrote:
Sorry didnt remember about that post but I have read it.
It did not work? Sorry, I just downloaded 0.7 and starting now :)

Re: From ghost to character or from god to character.

Posted: Sun Sep 29, 2013 4:43 pm
by ficolas
rk84 wrote:
ficolas wrote:
Sorry didnt remember about that post but I have read it.
It did not work? Sorry, I just downloaded 0.7 and starting now :)
havent tested yet, I dont think I will today.

Re: From ghost to character or from god to character.

Posted: Sun Sep 29, 2013 4:55 pm
by ficolas
also is it possible to get the position/inventory/move/give items etc to the god controller?

Re: From ghost to character or from god to character.

Posted: Sun Sep 29, 2013 6:02 pm
by rk84
ficolas wrote:also is it possible to get the position/inventory/move/give items etc to the god controller?
Yes. Same methods/properties that works for "game.player.character" should work for "game.player.controller"