Page 1 of 1

Is it possible to access the players score?

Posted: Sun Nov 22, 2015 4:16 pm
by thurak126
I know you can use on_rocket_launched, but is there any way to get the players current score for if the mod is added after a player launches some rockets.

Re: Is it possible to access the players score?

Posted: Sun Nov 22, 2015 7:34 pm
by prg
thurak126 wrote:I know you can use on_rocket_launched, but is there any way to get the players current score for if the mod is added after a player launches some rockets.
The score that gets displayed in the top left is stored in the freeplay scenario's control.lua's global table and there's no remote interface added to access it. So I guess no, it's not possible to get at it.

Re: Is it possible to access the players score?

Posted: Sun Nov 22, 2015 7:40 pm
by Supercheese
According to this post, you can indeed read the number: https://forums.factorio.com/forum/vie ... 94#p104394

Re: Is it possible to access the players score?

Posted: Sun Nov 22, 2015 7:49 pm
by prg
Oh, duh. Indeed, you can access other mods' GUI elements. Not the most elegant thing to do, but seems to work.