Floating Text

Place to get help with not working mods / modding interface.
User avatar
Ranakastrasz
Smart Inserter
Smart Inserter
Posts: 2171
Joined: Thu Jun 12, 2014 3:05 am
Contact:

Floating Text

Post by Ranakastrasz »

Is it possible to make, via script, floating text, similar to that of most item movement events appear?
My Mods:
Modular Armor Revamp - V16
Large Chests - V16
Agent Orange - V16
Flare - V16
Easy Refineries - V16
User avatar
DaveMcW
Smart Inserter
Smart Inserter
Posts: 3716
Joined: Tue May 13, 2014 11:06 am
Contact:

Re: Floating Text

Post 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}}
Bizz Keryear
Long Handed Inserter
Long Handed Inserter
Posts: 91
Joined: Thu Oct 22, 2015 5:08 am
Contact:

Re: Floating Text

Post by Bizz Keryear »

Error: LuaGameScript doesn't contain key get_surface
User avatar
Klonan
Factorio Staff
Factorio Staff
Posts: 5267
Joined: Sun Jan 11, 2015 2:09 pm
Contact:

Re: Floating Text

Post 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}}
Nexela
Smart Inserter
Smart Inserter
Posts: 1828
Joined: Wed May 25, 2016 11:09 am
Contact:

Re: Floating Text

Post 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}})
Bizz Keryear
Long Handed Inserter
Long Handed Inserter
Posts: 91
Joined: Thu Oct 22, 2015 5:08 am
Contact:

Re: Floating Text

Post by Bizz Keryear »

Umm, still according to documentation get_surface should be a thing
daniel34
Global Moderator
Global Moderator
Posts: 2761
Joined: Thu Dec 25, 2014 7:30 am
Contact:

Re: Floating Text

Post 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
quick links: log file | graphical issues | wiki
Bizz Keryear
Long Handed Inserter
Long Handed Inserter
Posts: 91
Joined: Thu Oct 22, 2015 5:08 am
Contact:

Re: Floating Text

Post 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
Post Reply

Return to “Modding help”