How do I create scripted strings in custom scenarios?
Posted: Thu May 12, 2016 1:12 pm
Hi forum,
I'm new to Factorio and loving every second of it so far. A game with a world builder always has two notches advantage over ones without in my book, and I'm very happy creating a neat little world so far.
I've seen some scenarios (I found a few in the PvP scenarios post) employ lua scripts to create text at spawn, but when I open their control.lua, it seems like there's a lot more code in there than I'd expect for just a spawning text. I guess the map authors do a whole lot more in their maps than just write spawn text. Also the campaign lua codes seem to reference external story script files, which leaves me wondering: what is the correct approach?
So I'd like to ask you guys if you know.
How do I create text at spawn? And can I script specific text to show up when a certain specific structure placed in the scenario comes into view, or the player enters a specific area on the map? I think some printed text is all I need for now; nothing elaborate (we'll save that for later haha).
Thanks,
Shrooblord
I'm new to Factorio and loving every second of it so far. A game with a world builder always has two notches advantage over ones without in my book, and I'm very happy creating a neat little world so far.
I've seen some scenarios (I found a few in the PvP scenarios post) employ lua scripts to create text at spawn, but when I open their control.lua, it seems like there's a lot more code in there than I'd expect for just a spawning text. I guess the map authors do a whole lot more in their maps than just write spawn text. Also the campaign lua codes seem to reference external story script files, which leaves me wondering: what is the correct approach?
So I'd like to ask you guys if you know.
How do I create text at spawn? And can I script specific text to show up when a certain specific structure placed in the scenario comes into view, or the player enters a specific area on the map? I think some printed text is all I need for now; nothing elaborate (we'll save that for later haha).
Thanks,
Shrooblord