View previous topic :: View next topic |
Author |
Message |
PK-Gamer Currently making an RPG

Joined: 11 Jan 2013 Posts: 23 Location: MD
|
Posted: Sat Jan 02, 2016 9:52 am Post subject: Changing the color of a text |
|
|
Hi all,
Is there a way that I can change the color of the text that is displayed with a plotscript action?
EDIT:What exactly I'm trying to do is, display a text and after some multiple wait times, have the text change different colors.
For example...
show text box(121)
wait(5)
change text color(color)
wait(5)
change text color(color)
Does it work something like this? |
|
Back to top |
|
 |
TMC On the Verge of Insanity
Joined: 05 Apr 2003 Posts: 3240 Location: Matakana
|
Posted: Sat Jan 02, 2016 6:03 pm Post subject: |
|
|
Yes. Textboxes are displayed using 'slices', so it's as simple as changing the colour of the Text slice:
Code: |
script, change textbox text color, color, begin
variable(text slice)
text sl := lookup slice(sl:textbox text)
if (text sl) then ( # do nothing if there's no textbox open
set text color(text sl, color)
)
end
|
_________________ "It is so great it is insanely great." |
|
Back to top |
|
 |
PK-Gamer Currently making an RPG

Joined: 11 Jan 2013 Posts: 23 Location: MD
|
Posted: Sun Jan 03, 2016 10:39 am Post subject: |
|
|
Okay, cool. Also, what are the colors I can use. I mean would I need to do something like this...
sext text color(text sl, color:red)
Also, what are the colors I can use? |
|
Back to top |
|
 |
TMC On the Verge of Insanity
Joined: 05 Apr 2003 Posts: 3240 Location: Matakana
|
Posted: Mon Jan 04, 2016 12:17 am Post subject: |
|
|
Indices of colours in the master palette, from 0 to 255. If you go into the Edit UI Colors menu and hit Enter on any option, then you will get a colour picker that shows you the index (number) of each colour. _________________ "It is so great it is insanely great." |
|
Back to top |
|
 |
|