Page 1 of 1

optional attribute for flying-text to anchor it to another entity

Posted: Mon Nov 12, 2018 7:38 pm
by Godmave
with anchor being the entity

possible version:

Code: Select all

anchor.surface.create_entity{name = "flying-text", anchor=anchor, position = {0,0.5}, text = text, color = {r=1,g=0,b=0}}
or to better differentiate it from the normal variant:

Code: Select all

anchor.surface.create_entity{name = "flying-text", anchor=anchor, offset = {0,0.5}, text = text, color = {r=1,g=0,b=0}}
So, if you do that to a rolling stock or any other moving entity the text will follow it around.

Also nice to have attributes would be

Code: Select all

speed 
and

Code: Select all

ttl
(0=never die) so you do not have to tinker with the datastage for such simple things.

Re: optional attribute for flying-text to anchor it to another entity

Posted: Tue Nov 13, 2018 9:24 am
by darkfrei
And direction / rotation of entity?

It will be nice to have sticker with text. As option, glue this sticker to the player.

Re: optional attribute for flying-text to anchor it to another entity

Posted: Tue Nov 13, 2018 10:54 am
by Klonan
It would be better, to add rendering text to the highlight box entity, rather than give the flying text the ability to follow the entity.

Re: optional attribute for flying-text to anchor it to another entity

Posted: Tue Nov 13, 2018 9:47 pm
by eradicator
Klonan wrote:
Tue Nov 13, 2018 10:54 am
It would be better, to add rendering text to the highlight box entity, rather than give the flying text the ability to follow the entity.
Does that imply highlight boxes can already follow entities :3?

I tried ontick teleporting a flying text onto a car the other day and was shocked how expensive that is.

Re: optional attribute for flying-text to anchor it to another entity

Posted: Fri Jan 04, 2019 6:27 pm
by Bilka
Hello, this has been solved with the text object in the script rendering implemented in 0.17: https://lua-api.factorio.com/0.17.0-pre ... ering.html