Posted By
|
Message
|
Don Luciano Heavy combat pancake
Registered 25/10/2006
Points 380
|
14th March, 2011 at 17:38:41 -
Can a part of the string be a different color?
Code me a sausage!
|
Jon Lambert Administrator
Vaporware Master
Registered 19/12/2004
Points 8235
|
14th March, 2011 at 18:25:53 -
No.
Sandwich Time!Whoo!
JoyCheck & KeyCheck Widgets
For easy implementation of customizable joystick and keyboard controls.
http://www.create-games.com/download.asp?id=8364
|
Rich Datson
Registered 11/05/2010
Points 360
|
15th March, 2011 at 23:58:18 -
Since I'm here I might also ask a question. I was wondering if there is a way to make a string object appear in front of an active object?
Help plz?
|
Jon Lambert Administrator
Vaporware Master
Registered 19/12/2004
Points 8235
|
16th March, 2011 at 00:00:14 -
In the display properties, uncheck "Display as background", then bring it to the front.
Sandwich Time!Whoo!
JoyCheck & KeyCheck Widgets
For easy implementation of customizable joystick and keyboard controls.
http://www.create-games.com/download.asp?id=8364
|
Rich Datson
Registered 11/05/2010
Points 360
|
16th March, 2011 at 01:34:20 -
Sweet thanks for that, that was so much easier than what I was trying to do in the event editor....
Help plz?
|
Chris Burrows
Registered 14/09/2002
Points 2396
|
16th March, 2011 at 02:03:59 -
Hey Don,
You can't make a part of a string a different colour but there are ways around it.
I had a similar problem a few days ago.
I'm using the text blitter object so it may be different. But anyway, this is what I did:
Create 2 text blitter objects.
1 displaying the full text in white. For example "Will you take the Handgun?"
1 just displaying the text you want in a different colour. For example "Handgun". Set it to green.
Now cause I'm never going to use the "#" character in my text I actually set the first text blitter object to "Will you take the #Handgun?"
Then when the 1st text blitter object comes to the "#" character, it sets the x,y position of the second the 2nd to that position. Making the green text appear over the white text. So the word "Handgun" is still there in white, there's just a green word "Handgun" over the top.
I hope that makes sense. I'm not sure if this is possible with the string object.
Because you create each individual character for the Text Blitter object, you are able to make the "#" character invisible.
The string object would have to display the #. And I'm not sure how to search a string object for the x,y co-ordinates of a single character. Pretty sure you can't.
Here is a game I'm working on using the Text Blitter method above. Hold F1 for the controls.
http://www.whenthereisnoroominhellthedeadwalktheearth.com/NoRoomInHell2.zip (3.2mb)
I hope that helped. Good luck.
n/a
|
Don Luciano Heavy combat pancake
Registered 25/10/2006
Points 380
|
16th March, 2011 at 11:46:11 -
Oh, thanks but its actually not that important for me in my current project, and i could probably use two strings in my case.
Did like the game though, i think i can remember that chlocakes had made the first one ...?
Code me a sausage!
|
Akai_R
Registered 16/04/2008
Points 436
|
23rd March, 2011 at 18:59:59 -
I know you said you didn't need it right now, but I though I might drop in anyway. It can be done with just one object (either Rich Edit Object or the Text Blitter, as far as I know).
The Text Blitter way is too complicated for me and I'm not even sure how to it properly, but it can be easily done with the REO.
You do just a Chris said, have a sign ( # for example ) or just the word you want to change to a different color and in the event editor do this:
On action
- find and select "your word")
- change color to(0,0,0)
and you're done. I was actually looking all over for a way to do this before, so if you don't need it, maybe it'll help someone else!
______
http://akai-r.com/
|
|
|