Page 1 of 1

Custom pop-up messages?

Posted: Tue Jul 26, 2016 2:09 pm
by Versepelles
Is it possible to create custom pop-up messages in freeplay, like the intro and game-end messages? Player.set_ending_screen_data(...) provides a one-time message that fires when a rocket is launched, but I'd like to have multiple of these, if possible.

Re: Custom pop-up messages?

Posted: Tue Jul 26, 2016 4:32 pm
by DedlySpyder
Like box with the arrow pointer to the player? I believe it uses this.

Re: Custom pop-up messages?

Posted: Tue Jul 26, 2016 5:16 pm
by Versepelles
DedlySpyder wrote:Like box with the arrow pointer to the player? I believe it uses this.
That's close; I think I actually meant the box with a grey background that triggers when the player launches a rocket. Is there a way to message the player in that style, aside from the initial win instance? The game.show_message_dialog(...) method only works for a single player, which isn't quite what I'm looking for.

Re: Custom pop-up messages?

Posted: Tue Jul 26, 2016 8:05 pm
by DedlySpyder
I'm not really sure what you mean, unless you're talking about the game over (with kill stats) screen? If you want something like that you could just use a GUI frame with a button to close it.

Re: Custom pop-up messages?

Posted: Tue Jul 26, 2016 8:09 pm
by DaveMcW
Versepelles wrote:I actually meant the box with a grey background that triggers when the player launches a rocket. Is there a way to message the player in that style, aside from the initial win instance?
Just copy the player.gui code from Factorio\data\base\scenarios\freeplay\control.lua

Re: Custom pop-up messages?

Posted: Tue Jul 26, 2016 8:27 pm
by Versepelles
DedlySpyder wrote:I'm not really sure what you mean, unless you're talking about the game over (with kill stats) screen? If you want something like that you could just use a GUI frame with a button to close it.
Didn't even think of that! Been used to top and left for so long, never used center. Thanks!