Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

XY Text Question

Ruboneout Shoreman
Registered User
Join date: 29 Jul 2009
Posts: 38
01-26-2010 18:03
Sooo, for the past few hours, I have been googling XY Text and trying to read and figure out every possible tutorial that I could find on how to make a giant billboard with Xy Text. I can set it up perfectly so when I type in a chat message, it will reflect onto the prim and display it. However, that is only one prim. No matter what I do, I can't figure out how to link multiple prims together and get it to successfully make a board.

I have even tried to work on some XyzzyText from this website. http://wiki.secondlife.com/wiki/XyzzyText.. I followed the step by step tutorial, especially when it comes to "Move a copy of this row a little down, and rename the new row(xyzzytext-1-0 xyzzytext-1-1,xyzzytext-1-2)" However, once I get past the second row, and move down to the third and forth row, those don't change when I type in a chat command.

Basically, what it amounts to is, can anyone show me where in the script I would change this, or can you direct me to a another tutorial that does explain it a little better, in-game or online. Thank you.
SuezanneC Baskerville
Forums Rock!
Join date: 22 Dec 2003
Posts: 14,229
01-26-2010 18:14
What did you name the ones in the 3rd and 4th rows?
_____________________
-

So long to these forums, the vBulletin forums that used to be at forums.secondlife.com. I will miss them.

I can be found on the web by searching for "SuezanneC Baskerville", or go to

http://www.google.com/profiles/suezanne

-

http://lindenlab.tribe.net/ created on 11/19/03.

Members: Ben, Catherine, Colin, Cory, Dan, Doug, Jim, Philip, Phoenix, Richard,
Robin, and Ryan

-
Ruboneout Shoreman
Registered User
Join date: 29 Jul 2009
Posts: 38
01-26-2010 18:16
I just tried to redo the entire tutorial and i got my 4 rows and 4 columns. The first message I type goes onto the second row, then the second message I type, goes onto the first row. THEN the third and forth row do nothing. Can anyone show me what I need to change in the script to fix this.
.......
Ruboneout Shoreman
Registered User
Join date: 29 Jul 2009
Posts: 38
01-26-2010 19:11
is there any way that I can get the text to wrap to the next line as well? This guessing how many words I can fit on one line is getting really old, really fast.
SuezanneC Baskerville
Forums Rock!
Join date: 22 Dec 2003
Posts: 14,229
01-26-2010 19:31
I've been trying and I'm having about as much luck as you are.

I'm getting an hourglass in SL so it might not be working as a result of that.

Mine's not doing anything anymore.
_____________________
-

So long to these forums, the vBulletin forums that used to be at forums.secondlife.com. I will miss them.

I can be found on the web by searching for "SuezanneC Baskerville", or go to

http://www.google.com/profiles/suezanne

-

http://lindenlab.tribe.net/ created on 11/19/03.

Members: Ben, Catherine, Colin, Cory, Dan, Doug, Jim, Philip, Phoenix, Richard,
Robin, and Ryan

-
Ruboneout Shoreman
Registered User
Join date: 29 Jul 2009
Posts: 38
01-26-2010 19:36
integer DISPLAY_STRING = 204000;
integer DISPLAY_EXTENDED = 204001;
integer REMAP_INDICES = 204002;
integer RESET_INDICES = 204003;
integer SET_FADE_OPTIONS = 204004;
integer SET_FONT_TEXTURE = 204005;
integer SET_LINE_COLOR = 204006;
integer SET_COLOR = 204007;
integer RESCAN_LINKSET = 204008;


integer gToggle;

default
{
state_entry()
{
llListen(0,"",NULL_KEY,"";);

}


listen(integer channel,string name, key id, string message)
{
if (gToggle)
llMessageLinked(LINK_THIS,DISPLAY_STRING,name + ":"+ message,"0";);
else
llMessageLinked(LINK_THIS,DISPLAY_STRING,name + ":"+ message,"1";);

gToggle=!gToggle;

}
}

I am almost positive it has something to do with this script. I changed the 1 and 0 around, and i got it to work as in first thing i say goes to first, second thing i say goes to second line. The only problem is, i dont know how to add llMessageLinked for 3rd row and 4th.
Void Singer
Int vSelf = Sing(void);
Join date: 24 Sep 2005
Posts: 6,973
01-26-2010 19:44
presumably if you want text wrapping you'd take the whole message, and divide it into chunks by the row, and send the first chunk the the first row, etc... for actual word wrapping and not character wrapping you'd need to break the text down by word, then add words until the next add would overflow and break your text there...

something like
text = "some really long phrase" + " ";
string send = llGetSubString( 0, cut_cutoff );
integer end = -1
while (llGetSubString( end, end ) != " ";) --end;
send = llGetSubString( 0, end );

I use my own custom built version of it, so it's hard to know where your problem lies, other than the message isn't being sent to or received by the following rows...

PS.
I meant to mention it before, Love the name =)

ETA:
if I read that right it'll send to the first line, then the second, and repeat...
if you send to
llMessageLinked(LINK_THIS,DISPLAY_STRING,name + ":"+ message,"2";);
that'd be the third line, etc...


llMessageLinked(LINK_THIS,DISPLAY_STRING,name + ":"+ message, (string)(gToggle++ % max) );

should replace all the code in your listen (replace max with your number of lines)
_____________________
|
| . "Cat-Like Typing Detected"
| . This post may contain errors in logic, spelling, and
| . grammar known to the SL populace to cause confusion
|
| - Please Use PHP tags when posting scripts/code, Thanks.
| - Can't See PHP or URL Tags Correctly? Check Out This Link...
| -
Ruboneout Shoreman
Registered User
Join date: 29 Jul 2009
Posts: 38
01-26-2010 19:53
LOL thanks. I was in some insanely weird, and kind of hyper mood at the same I made it. I am just surprised that I have not been asked to change it yet. Thanks for helping me with all my scripting questions by the way, and I apologize if it of annoyance. Anyways, to stay on topic,
would it be easier to do a character wrap instead of word wrap?
As long as it switches from line to line, I really don't care. I guess word wrap was just the first phrase that entered my head. heh.

Thanks for that code that you wrote, it completely fixed all of my line problem.... :D, now i just needa figure out the letter,word wrap, and I should be solid :D
SuezanneC Baskerville
Forums Rock!
Join date: 22 Dec 2003
Posts: 14,229
01-26-2010 20:10
Try changing the 0 and 1 to 1 and 2.

I think this is just a barebones demo.

The 0 and 1 are "bank numbers", which I think are what one might call row numbers, since the instructions refer to making copies of rows, rather than bank.

I think the scripts may need to be reset in order to get a valid test after a modification .

See if this helps:

CODE
integer DISPLAY_STRING      = 204000; 
integer DISPLAY_EXTENDED = 204001;
integer REMAP_INDICES = 204002;
integer RESET_INDICES = 204003;
integer SET_FADE_OPTIONS = 204004;
integer SET_FONT_TEXTURE = 204005;
integer SET_LINE_COLOR = 204006;
integer SET_COLOR = 204007;
integer RESCAN_LINKSET = 204008;


integer linenum = 0;
string linenumstring = "0";
key linenumkey = "0";
integer numlines = 4;

default
{
state_entry()
{
llListen(0,"",NULL_KEY,"");
linenum=0;

}


listen(integer channel,string name, key id, string message)
{
linenumstring = (string) linenum;
llMessageLinked(LINK_THIS,DISPLAY_STRING, message,linenumstring);
linenum = linenum + 1;
if (linenum >= numlines) linenum = 0 ;



}
}
_____________________
-

So long to these forums, the vBulletin forums that used to be at forums.secondlife.com. I will miss them.

I can be found on the web by searching for "SuezanneC Baskerville", or go to

http://www.google.com/profiles/suezanne

-

http://lindenlab.tribe.net/ created on 11/19/03.

Members: Ben, Catherine, Colin, Cory, Dan, Doug, Jim, Philip, Phoenix, Richard,
Robin, and Ryan

-
Void Singer
Int vSelf = Sing(void);
Join date: 24 Sep 2005
Posts: 6,973
01-26-2010 21:48
character wrap is fairly easy,

CODE

integer maxPerLine = 5; //-- change to however many characters you have per line
message = name + ":" + message;
while (llStringLength( message ) > maxPerLine){
llMessageLinked( LINK_THIS, DISPLAY_STRING, llGetSubString( message, 0, maxPerLine - 1 ), (string)(gToggle++ % max) );
message = llGetSubString( message, maxPerLine, -1 );
}


you should be able to figure out the changes from there if you want to include the name for every line
_____________________
|
| . "Cat-Like Typing Detected"
| . This post may contain errors in logic, spelling, and
| . grammar known to the SL populace to cause confusion
|
| - Please Use PHP tags when posting scripts/code, Thanks.
| - Can't See PHP or URL Tags Correctly? Check Out This Link...
| -
Ruboneout Shoreman
Registered User
Join date: 29 Jul 2009
Posts: 38
01-26-2010 22:18
Thank you so much void :D. I have 1 more question for you too if you don't mind. It is not really related to the XY test, but I figure I'll try and ask it here instead of going through the trouble of continuing to flood the board with another question thread. My friend wants to make a color HUD for his club, to press 1 button and change the color of everything in his Club... however, I cant link everything to his HUD and use llMessageLinked.

is there another way I can do this instead of filling every single object with a llListen... That seems to be incredibly inefficient and very not sim friendly. However, llMessageLinked, and llListen are the only two ways that I can think of. Maybe I could do an Email... By having every single prim constantly strive to get incoming emails doesn't seem that great either... Any ideas? Thank you once again for all of your help, and continued help in my learning of LSL.

The only thing I can think of is for me to tell him to link as much of his lights together and stuff, and put 1 listen in a group of linked lights, then have them do a linked message amongst each other?

Edit : i tried the character wrap thing, and it worked great but it only worked on the first 2 rows. I made max 4 because thats how many rows I have, but still nothing. hmm
Void Singer
Int vSelf = Sing(void);
Join date: 24 Sep 2005
Posts: 6,973
01-27-2010 00:32
on the first part, yeah you pretty much either have to install listens in all of them, or link them and have as many single object listens as possible.... though it's possible to do most of the changes from a single script to all the linked parts (I doubt it'll matter much if they recolor in sequence)

I built a quickie re-decorator (per face color/texture/rotation/etc) that used link messages to local scripts, but it's a bit arcane, and definately not something I want to release free, or wild (as it requires open access in it's current form) but I suppose I should re-code that for release one day (I've had several requests)

on the last part, I made a bad loop assumption (it ignores the tail of the message)
integer maxPerLine = 5; //-- change to however many characters you have per line

CODE

message = name + ":" + message;
integer maxPerLine = 5 - 1; //-- replace 5 with your character max
do{
llMessageLinked( LINK_THIS, DISPLAY_STRING, llGetSubString( message, 0, maxPerLine - 1 ), (string)(gToggle++ % max) );
message = llDeleteSubString( message, 0, maxPerLine );
}while (message);
_____________________
|
| . "Cat-Like Typing Detected"
| . This post may contain errors in logic, spelling, and
| . grammar known to the SL populace to cause confusion
|
| - Please Use PHP tags when posting scripts/code, Thanks.
| - Can't See PHP or URL Tags Correctly? Check Out This Link...
| -