Advanced coloured text function!
Posted: Wed Apr 06, 2011 7:03 pm
Hello!
I'm here now with my latest creation, function,
that lets you print text with many colours!
Here is the source code:
There is six escape sequences:
/| - new line
/r - red
/g - green
/b - blue
/y - yellow
/w - white
They are usable like this:
Using code like this, it would print following text to position 100, 100.
This is just
example line.
At create actor event of view, there is function startupDef(7, 12);
It sets the characters to be 7 pixels away from each other in x axis and 12 pixels away from
other lines in y axis.
The .zip contains versions with and without typewriting effect.
I made the one without it for those who don't know so much about scripting for the typewriting codes
not to confuse those people.
It's all based on cloning the text actor and setting the clones
r, g and b values.
If there is something in the code you don't understand, but you want,
don't hesitate to ask me! I would be glad to help people understand this.
Give me feedback about it.
-lcl -
I'm here now with my latest creation, function,
that lets you print text with many colours!
Here is the source code:
There is six escape sequences:
/| - new line
/r - red
/g - green
/b - blue
/y - yellow
/w - white
They are usable like this:
- Code: Select all
print("/gThis is just/| /rexample /gline.", 100, 100);
Using code like this, it would print following text to position 100, 100.
This is just
example line.
At create actor event of view, there is function startupDef(7, 12);
It sets the characters to be 7 pixels away from each other in x axis and 12 pixels away from
other lines in y axis.
The .zip contains versions with and without typewriting effect.
I made the one without it for those who don't know so much about scripting for the typewriting codes
not to confuse those people.
It's all based on cloning the text actor and setting the clones
r, g and b values.
If there is something in the code you don't understand, but you want,
don't hesitate to ask me! I would be glad to help people understand this.
Give me feedback about it.
-lcl -