Page 1 of 1

Flying-text and carriage return ?

Posted: Sat Aug 06, 2016 4:46 pm
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 ?

Re: Flying-text and carriage return ?

Posted: Sat Aug 06, 2016 6:46 pm
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