Printing player choice in dialogue in color - conv lib [SOLVED]

laubwolf
25 Feb 2018, 18:57

hi everyone,

im changing a piece of the "converse" function of pixies conversation lib, to print the player choice in dialogues.
This is my current working setup:

// do the topics conversation
msg (o.alias) <-THIS
msg ("")
do (o, "topictalk")
terminate = o.terminal

i want to print the player answer in a different color. Been fuddling around with

msg ({colour:red:o.alias})
msg ({colour:red:"o.alias"})
msg ("{colour:red:"o.alias"}")

but nothing works out...
not even sure i can use the text processor commands here.
help? :)


The Pixie
25 Feb 2018, 19:06

Try:
msg ("{colour:red:o.alias}")


laubwolf
25 Feb 2018, 19:22

well it workes but it acutally prints "o.alias" in red every time, not the value of o.alias...


K.V.
25 Feb 2018, 19:43

He meant:

msg ("{colour:red:{o.alias}}")


laubwolf
25 Feb 2018, 21:38

prints {o.alias} every time. still same problem. sorry ^^


K.V.
25 Feb 2018, 21:45

Sorry!

(That is not what The Pixie meant!)

The text processor can't detect local variables, such as o.

This works for me:

msg ("{color:red:"+o.alias+"}")

Sorry about all the confusion. I didn't test that first suggestion, and I normally do.


laubwolf
25 Feb 2018, 23:51

Nice that works like a charm. Really works wonders on the readability of my game. Thanks a lot to both of you!