Page 1 of 1

Problem with R;G;B properties of Actor's text.

PostPosted: Mon Feb 16, 2009 3:57 pm
by Grahor
Greetings. I've discovered game-editor yesterday, and was playing with it a bit, but currently I've stuck: apparently, I don't understand something.

So, I make an actor (called "Next") with text, and use the font tools to make the text of some color, say, the word "NEXT" with values 0,0,255, making it blue. Okay, so, now I'm using, say, a Filled Region above the word which on action "MouseEnter" starts script Next.r=255;Next.g=0;Next.b=0;. It should turn the word NEXT red, but it doesn't, instead it makes it black.

Now, if at the beginning I'll create a white font (255,255,255) for Next actor, then the same script works flawlessly, making the word NEXT red on mouseover. Apparently, MyActor.r=255; does not turn the text red; it turns the text as red as it is possible to do within original parameters of given font. Is it so or am I missing something? Is it a bug or a feature? Is there a way around it?

Also, I wonder, if there is a way to have text with different colors in the same actor.

Thanks.

Re: Problem with R;G;B properties of Actor's text.

PostPosted: Mon Feb 16, 2009 4:08 pm
by jimmynewguy
make the text white then create it and set
r = 0;
b = 255;
g = 0;

then mouse over
r = 255;
b = 0;

mouse leave
r = 0;
b = 255;

basically what you had with white text not blue
you had the right idea just a little off, welcome to the forums :D

Re: Problem with R;G;B properties of Actor's text.

PostPosted: Mon Feb 16, 2009 4:26 pm
by Grahor
Thanks. Rather obvious workover, but still, it should be probably mentioned somewhere in the manual. :) Also, another question - can I change the text of the actor in such a way so to have two or more lines? Something like strcpy (MyActor.text,"This is the first line.\nThis is the second line."); ?

Re: Problem with R;G;B properties of Actor's text.

PostPosted: Mon Feb 16, 2009 4:53 pm
by jimmynewguy
use strcpy

Code: Select all
strcpy(myacotr.text, "this is the first line\n thisisthesecond line");