Flying-text and carriage return ?

Place to get help with not working mods / modding interface.
User avatar
binbinhfr
Smart Inserter
Smart Inserter
Posts: 1525
Joined: Sat Feb 27, 2016 7:37 pm
Contact:

Flying-text and carriage return ?

Post by binbinhfr »

Hi,

I tried some possibilities but did not find a solution: is there a way to put several lines into a flying-text ? \n or something like that ?
My mods on the Factorio Mod Portal :geek:
Nexela
Smart Inserter
Smart Inserter
Posts: 1828
Joined: Wed May 25, 2016 11:09 am
Contact:

Re: Flying-text and carriage return ?

Post by Nexela »

I don't think there is a way to split them but you can do something like this to make it look like it does.


local textpos = entity.position
surface.create_entity({name="flying-text", position=textpos, text=line1})
textpos.y = textpos.y + 1
surface.create_entity({name="flying-text", position=textpos, text=line2})

Bonus points: wrap it in a function that splits up strings based on length
Post Reply

Return to “Modding help”