Page 1 of 1

game.print // player.print addition to add color

Posted: Mon Mar 12, 2018 5:44 am
by riot2212
If there is a way to do this, I apologize, I could not find a way to do this so I am requesting this

Basically the ability to set a color on game.print & player.print for example

Code: Select all

player.print("some random message to the player with the color red", {r=1, g=0, b=0, a=1})
if a color is not presented like

Code: Select all

player.print("some random message to the player with the default color")
then it would be the basic white.



just a thought. since the /color command shows the reply message colored. it would be nice if we could do the same with our scripts

Re: game.print // player.print addition to add color

Posted: Mon Mar 12, 2018 10:41 am
by eradicator
riot2212 wrote:If there is a way to do this, I apologize, I could not find a way to do this so I am requesting this

Basically the ability to set a color on game.print & player.print for example

Code: Select all

player.print("some random message to the player with the color red", {r=1, g=0, b=0, a=1})
You could not find a way to do this? Yet the code you post there is exactly how it's done. O_o

Re: game.print // player.print addition to add color

Posted: Mon Mar 12, 2018 11:51 am
by Klonan
eradicator wrote:
riot2212 wrote:If there is a way to do this, I apologize, I could not find a way to do this so I am requesting this

Basically the ability to set a color on game.print & player.print for example

Code: Select all

player.print("some random message to the player with the color red", {r=1, g=0, b=0, a=1})
You could not find a way to do this? Yet the code you post there is exactly how it's done. O_o
Yep...

http://lua-api.factorio.com/latest/LuaP ... ayer.print

Re: game.print // player.print addition to add color

Posted: Mon Mar 12, 2018 6:21 pm
by riot2212
really o_O

I did it like so and I got an error, I must of screwed something up in the code, my bad


Edit: I see why, I am coding in 15.40 yet, this is in 16. Okay we are all good.