How do I create scripted strings in custom scenarios?

Place to share custom user maps, scenarios and campaigns.
Post Reply
Shrooblord
Long Handed Inserter
Long Handed Inserter
Posts: 54
Joined: Thu May 12, 2016 12:57 pm
Contact:

How do I create scripted strings in custom scenarios?

Post by Shrooblord »

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

Post Reply

Return to “Maps and Scenarios”