Is it possible to access the players score?

Place to get help with not working mods / modding interface.
Post Reply
thurak126
Burner Inserter
Burner Inserter
Posts: 15
Joined: Mon Dec 08, 2014 11:39 am
Contact:

Is it possible to access the players score?

Post 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.

User avatar
prg
Filter Inserter
Filter Inserter
Posts: 947
Joined: Mon Jan 19, 2015 12:39 am
Contact:

Re: Is it possible to access the players score?

Post 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.
Automatic Belt (and pipe) Planner—Automate yet another aspect of constructing your factory!


User avatar
prg
Filter Inserter
Filter Inserter
Posts: 947
Joined: Mon Jan 19, 2015 12:39 am
Contact:

Re: Is it possible to access the players score?

Post by prg »

Oh, duh. Indeed, you can access other mods' GUI elements. Not the most elegant thing to do, but seems to work.
Automatic Belt (and pipe) Planner—Automate yet another aspect of constructing your factory!

Post Reply

Return to “Modding help”