Page 1 of 1

Floating Text

Posted: Thu Aug 13, 2015 10:45 pm
by Ranakastrasz
Is it possible to make, via script, floating text, similar to that of most item movement events appear?

Re: Floating Text

Posted: Fri Aug 14, 2015 1:05 am
by DaveMcW

Code: Select all

/c game.get_surface(1).create_entity{name="flying-text", position={0,0}, text="Hello world", color={r=0.5,g=1,b=1}}

Re: Floating Text

Posted: Wed Jul 06, 2016 1:14 pm
by Bizz Keryear
Error: LuaGameScript doesn't contain key get_surface

Re: Floating Text

Posted: Wed Jul 06, 2016 1:25 pm
by Klonan
Bizz Keryear wrote:Error: LuaGameScript doesn't contain key get_surface

Code: Select all

/c game.surfaces[1].create_entity{name="flying-text", position={0,0}, text="Hello world", color={r=0.5,g=1,b=1}}

Re: Floating Text

Posted: Wed Jul 06, 2016 1:56 pm
by Nexela

Code: Select all

/c game.surfaces[1].create_entity({name="flying-text", position=game.player.position,text="It looks like I am talking",color={r=0.5,g=1,b=1}})

Re: Floating Text

Posted: Wed Jul 06, 2016 4:05 pm
by Bizz Keryear
Umm, still according to documentation get_surface should be a thing

Re: Floating Text

Posted: Wed Jul 06, 2016 4:20 pm
by daniel34
Bizz Keryear wrote:Umm, still according to documentation get_surface should be a thing
Not in 0.13. It's not in the 0.13.0 doc and not in the current (0.13.5) one.
http://lua-api.factorio.com/0.13.5/LuaGameScript.html

Re: Floating Text

Posted: Wed Jul 06, 2016 9:38 pm
by Bizz Keryear
daniel34 wrote:
Bizz Keryear wrote:Umm, still according to documentation get_surface should be a thing
Not in 0.13. It's not in the 0.13.0 doc and not in the current (0.13.5) one.
http://lua-api.factorio.com/0.13.5/LuaGameScript.html
oki... was also relying on wiki as source of information ... obviously a mistake