Floating Text

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

Floating Text

Post by Ranakastrasz » Thu Aug 13, 2015 10:45 pm

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: 2719
Joined: Tue May 13, 2014 11:06 am
Contact:

Re: Floating Text

Post by DaveMcW » Fri Aug 14, 2015 1:05 am

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: 86
Joined: Thu Oct 22, 2015 5:08 am
Contact:

Re: Floating Text

Post by Bizz Keryear » Wed Jul 06, 2016 1:14 pm

Error: LuaGameScript doesn't contain key get_surface

User avatar
Klonan
Factorio Staff
Factorio Staff
Posts: 3592
Joined: Sun Jan 11, 2015 2:09 pm
Contact:

Re: Floating Text

Post by Klonan » Wed Jul 06, 2016 1:25 pm

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: 1793
Joined: Wed May 25, 2016 11:09 am
Contact:

Re: Floating Text

Post by Nexela » Wed Jul 06, 2016 1:56 pm

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: 86
Joined: Thu Oct 22, 2015 5:08 am
Contact:

Re: Floating Text

Post by Bizz Keryear » Wed Jul 06, 2016 4:05 pm

Umm, still according to documentation get_surface should be a thing

daniel34
Global Moderator
Global Moderator
Posts: 2757
Joined: Thu Dec 25, 2014 7:30 am
Contact:

Re: Floating Text

Post by daniel34 » Wed Jul 06, 2016 4:20 pm

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

Bizz Keryear
Long Handed Inserter
Long Handed Inserter
Posts: 86
Joined: Thu Oct 22, 2015 5:08 am
Contact:

Re: Floating Text

Post by Bizz Keryear » Wed Jul 06, 2016 9:38 pm

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”

Who is online

Users browsing this forum: No registered users