From ghost to character or from god to character.

Place to get help with not working mods / modding interface.
ficolas
Smart Inserter
Smart Inserter
Posts: 1068
Joined: Sun Feb 24, 2013 10:24 am
Contact:

From ghost to character or from god to character.

Post 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?
ficolas
Smart Inserter
Smart Inserter
Posts: 1068
Joined: Sun Feb 24, 2013 10:24 am
Contact:

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

Post by ficolas »

Sorry didnt remember about that post but I have read it.
User avatar
rk84
Filter Inserter
Filter Inserter
Posts: 556
Joined: Wed Feb 13, 2013 9:15 am
Contact:

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

Post 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 :)
Test mode
Searching Flashlight
[WIP]Fluid handling expansion
[WIP]PvP gamescript
[WIP]Rocket Express
Autofill: The torch has been pass to Nexela
ficolas
Smart Inserter
Smart Inserter
Posts: 1068
Joined: Sun Feb 24, 2013 10:24 am
Contact:

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

Post 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.
ficolas
Smart Inserter
Smart Inserter
Posts: 1068
Joined: Sun Feb 24, 2013 10:24 am
Contact:

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

Post by ficolas »

also is it possible to get the position/inventory/move/give items etc to the god controller?
User avatar
rk84
Filter Inserter
Filter Inserter
Posts: 556
Joined: Wed Feb 13, 2013 9:15 am
Contact:

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

Post 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"
Test mode
Searching Flashlight
[WIP]Fluid handling expansion
[WIP]PvP gamescript
[WIP]Rocket Express
Autofill: The torch has been pass to Nexela
Post Reply

Return to “Modding help”