Adventure Game Studio

AGS Support => Beginners' Technical Questions => Topic started by: Digger909 on Mon 09/02/2009 13:32:09

Title: How change color?
Post by: Digger909 on Mon 09/02/2009 13:32:09
I have a problem. How i can change font color of "Hello", when use script command:          Display ("Hello.");      ?    It'is always visible in black color, how i can change it? ??? ???
Title: Re: How change color?
Post by: Dualnames on Mon 09/02/2009 13:39:37
int Character.SpeechColor

Gets/sets the character's speech text color. This is set by default in the editor.

NEWCOLOR is the colour slot index from the Palette Editor. This can be 0-255 for a 256-colour game, or one of the hi-colour indexes available from the Palette Editor.

Example:

cEgo.SpeechColor = 14;

will change the character's EGO talking color to yellow.
Title: Re: How change color?
Post by: Khris on Mon 09/02/2009 14:12:44
This sets the color for the Character.Say command, not Display text boxes.

It's a bit complicated actually:

-Open a paint program and draw two pixels, one with the color you want as border color, then a second pixel left of the first one using a different color. Select those two pixels, hit Ctrl-C and switch to AGS.
-Open the Sprite manager, right click inside the window at a blank spot and import from clipboard, using the top-left pixel transparency setting. Then click "Import whole image", right-click the sprite and crop the edges.
Now you have a single pixel added to the sprite manager. Remember its slot number.
-In the tree, right-click "GUIs" and add a new Text Window GUI. Set the background color (white is 15, look up other color numbers in the palette pane) and the TextColor.
-Using the dropdown menu below the tree, set the number of the pixel sprite as Image for all eight edges.
-In the General Settings pane, under Text output, enter the GUI's number at "Custom text-window GUI".

Yup. Now you're all set :)
Title: Re: How change color?
Post by: Dualnames on Mon 09/02/2009 14:14:16
Quote from: KhrisMUC on Mon 09/02/2009 14:12:44
This sets the color for the Character.Say command, not Display text boxes.

It's a bit complicated actually:

-Open a paint program and draw two pixels, one with the color you want as border color, then a second pixel left of the first one using a different color. Select those two pixels, hit Ctrl-C and switch to AGS.
-Open the Sprite manager, right click inside the window at a blank spot and import from clipboard, using the top-left pixel transparency setting. Then click "Import whole image", right-click the sprite and crop the edges.
Now you have a single pixel added to the sprite manager. Remember its slot number.
-In the tree, right-click "GUIs" and add a new Text Window GUI. Set the background color (white is 15, look up other color numbers in the palette pane) and the TextColor.
-Using the dropdown menu below the tree, set the number of the pixel sprite as Image for all eight edges.
-In the General Settings pane, under Text output, enter the GUI's number at "Custom text-window GUI".

Yup. Now you're all set :)

Aw..f
Spoiler
ish
[close]
.. I misunderstood again..
Title: Re: How change color?
Post by: Digger909 on Mon 09/02/2009 14:23:27
Thank you VERY VERY much! Now I can change window with text messages, and border and color! Sps!  :D :D :D