I have just made a xytext notice board and was wondering how to make the text scroll in from the left. Has anyone done this or know how to all help apreciated.
thanks
Eazel
These forums are CLOSED. Please visit the new forums HERE
Scrolling xytext |
|
Eazel Allen
EA-design™
![]() Join date: 11 Feb 2007
Posts: 123
|
05-18-2008 03:07
I have just made a xytext notice board and was wondering how to make the text scroll in from the left. Has anyone done this or know how to all help apreciated.
thanks Eazel _____________________
http://secondlife://cub/235/190/465/
http://www.slexchange.com/modules.php?name=Marketplace&MerchantID=48444 |
Mrc Homewood
Mentor of Randomness
Join date: 24 Feb 2007
Posts: 779
|
05-18-2008 08:08
ive done something like that before ill check my scripts and give you an example
EDIT: you would use a timer and have it figure out how many chars there are and baicly have the timer set the word over and over on with the letters of the word offsetted, srry i cant be to much more help kinda one of my few secrets i wont give up unlike most of my other stuff ![]() |
Senuka Harbinger
A-Life, one bit at a time
![]() Join date: 24 Oct 2005
Posts: 491
|
05-18-2008 09:28
I wrote a seprate input script for my xytext board. The input script took the message to be displayed and stored it as a string. I had another string with a number of blank characters (spaces) for as many characters as the board would display across (this is the actual display string). The input script would then read the string to be displayed one character at a time. each time it read a character, it would add that to the end of the display string, and subtract the first character from the display string before transmitting the display string to the actual xytext script to be displayed. I added in a short if-then clause for when the message was read entirely to throw in some seperator characters before having it loop back to the start of the string and go over again
an alternative way to go about it would be to have two integer variables to mark the start and end of the portion of the string to be displayed, using llGetSubString() to pull the section of the message to be displayed. Just remember to put in an if-then statement for when the markers get to an end of the string. you could even be fancy and have two sets of markers so it can wrap the message to be displayed back on itself _____________________
My SLExchange shop
Typos are forgiven; desecrating the english language with reckless abandon and necrophilic acts is not. The function is working perfectly fine. It's just not working the way you wanted it to work. |
Eazel Allen
EA-design™
![]() Join date: 11 Feb 2007
Posts: 123
|
05-19-2008 02:12
thanks for replys I have had similar ideas myself but I cant put them to a script and get it working I was kinda hoping somone would post a line of code because Im a visual learner and that would help me write my own script more than anything .I probably am not going to use the scroll anyway because I cant see it handling sl lag very well but would be nice to be able to test that theary for myself b4 ditching the idea.
_____________________
http://secondlife://cub/235/190/465/
http://www.slexchange.com/modules.php?name=Marketplace&MerchantID=48444 |
Winter Ventura
Eclectic Randomness
![]() Join date: 18 Jul 2006
Posts: 2,579
|
05-19-2008 03:50
if you leave a border of "blank" on the first column, you can actually use llSetTextureAnim" to scroll smoothly through quite a number of lines of text. The downside being, that you have to prefabricate this text in the form of a multi-line image.
llSetTextureAnim(ANIM_ON | SMOOTH | LOOP, ALL_SIDES, 10, 10, 1, 100, 1); That statement will scroll 10 lines of text.. you can use 90% of the image width as text. It takes some experimenting, but you could easily do something like llSetTextureAnim(ANIM_ON | SMOOTH | LOOP, ALL_SIDES, 5, 32, 1, 100, 1); 5x32, would give you... 640 frames, you'd lose 32 of them in the first column.. but you'd get 32 lines.. on a 1024 image, that'd be 32px tall. You could skimp and go to 16px tall (and get 64 lines in a document. Now that I look at it, you might want to make it the first and last columns. _____________________
![]() ● Inworld Store: http://slurl.eclectic-randomness.com ● Website: http://www.eclectic-randomness.com ● Twitter: @WinterVentura |
Eazel Allen
EA-design™
![]() Join date: 11 Feb 2007
Posts: 123
|
05-19-2008 04:18
if you leave a border of "blank" on the first column, you can actually use llSetTextureAnim" to scroll smoothly through quite a number of lines of text. The downside being, that you have to prefabricate this text in the form of a multi-line image. llSetTextureAnim(ANIM_ON | SMOOTH | LOOP, ALL_SIDES, 10, 10, 1, 100, 1); That statement will scroll 10 lines of text.. you can use 90% of the image width as text. It takes some experimenting, but you could easily do something like llSetTextureAnim(ANIM_ON | SMOOTH | LOOP, ALL_SIDES, 5, 32, 1, 100, 1); 5x32, would give you... 640 frames, you'd lose 32 of them in the first column.. but you'd get 32 lines.. on a 1024 image, that'd be 32px tall. You could skimp and go to 16px tall (and get 64 lines in a document. Now that I look at it, you might want to make it the first and last columns. yes that makes sense ty and I will remeber that but in this case I really wanted to get xytext scrolling as is for my store noticeboard and would like to be able to make quick changes for sales and such .I have already written the read from notecard bit and got it working .I think that Senuka Harbinger`s idea is the way to go but Im not sure how to write that script. _____________________
http://secondlife://cub/235/190/465/
http://www.slexchange.com/modules.php?name=Marketplace&MerchantID=48444 |
Winter Ventura
Eclectic Randomness
![]() Join date: 18 Jul 2006
Posts: 2,579
|
05-19-2008 04:23
I did up a little demo.
CODE
Here's what the texture looks like. http://img440.imageshack.us/img440/278/messageboardfs1.png _____________________
![]() ● Inworld Store: http://slurl.eclectic-randomness.com ● Website: http://www.eclectic-randomness.com ● Twitter: @WinterVentura |
Eazel Allen
EA-design™
![]() Join date: 11 Feb 2007
Posts: 123
|
05-20-2008 02:59
I did up a little demo. CODE
Here's what the texture looks like. http://img440.imageshack.us/img440/278/messageboardfs1.png Ty winter for demo and will use that way for more perminant signs and I will eventually work out how to do it with xytext when have time to reverse engineer the whole script so I understand it better. And I totally agree with what you say in that demo and do try to save resources all the time if everyone thought that way sl would run smoother. _____________________
http://secondlife://cub/235/190/465/
http://www.slexchange.com/modules.php?name=Marketplace&MerchantID=48444 |
Winter Ventura
Eclectic Randomness
![]() Join date: 18 Jul 2006
Posts: 2,579
|
05-20-2008 03:52
one neat thing you can do, is set PARTS of the message.. since you can set the "start frame" and the "animation length" you can selectively play PARTS of the texture, rather than the whole thing so if you have an image like mine, .. Set lines 1-3 for your welcome sign
llSetTextureAnim(ANIM_ON | SMOOTH | LOOP, ALL_SIDES, 6, 32, 1, 18, .3); Set lines 4 and 5 for your shoe section llSetTextureAnim(ANIM_ON | SMOOTH | LOOP, ALL_SIDES, 6, 32, 18, 12, .3); Let's say you have a regular event that happens... lines 6-8 apply to that. llSetTextureAnim(ANIM_ON | SMOOTH | LOOP, ALL_SIDES, 6, 32, 32, 12, .3); You can still change the message dynamically "as needed" as long as you're able to plan ahead for the kinds of things that happen regularly at your business. And if you come up with something new.. it's 10L to change it. Though I'll bet that someone smart could rig up a PHP script to generate such an image "on the fly" and you could apply it using parcel media. _____________________
![]() ● Inworld Store: http://slurl.eclectic-randomness.com ● Website: http://www.eclectic-randomness.com ● Twitter: @WinterVentura |
Very Keynes
LSL is a Virus
Join date: 6 May 2006
Posts: 484
|
05-20-2008 08:41
Hi Winter,
I just tried your demo and I am awe struck ![]() You are really onto something there, as I watch it scroll all kinds of applications spring to mind. I hope you have no objections to me studying this further, if you are also going to expand on your concept maybe we can share thoughts. Thanks for the inspiration and such an elegantly simple, yet profoundly powerful script. _____________________
House of Keynes http://slurl.com/secondlife/Seopophang/237/151/104
![]() Romantica Yacht Club http://slurl.com/secondlife/Jeffrey/58/227/26 Salsa Romantica http://slurl.com/secondlife/Seopophang/77/91/94 |
Johan Laurasia
Fully Rezzed
![]() Join date: 31 Oct 2006
Posts: 1,394
|
05-20-2008 09:29
Funny how the simplest solution can be the most effective eh? Good job Winter, that's an excellent solution for scrolling text. Simple to code, simple to setup, and the cleanest and lowest possible lag solution available. Once the texture animation is executed, one can delete the script, and since texture animations persist forever (one can even take the object into inventory and re-rez without the script and the animation will persist). Kudos to Winter
![]() |
Winter Ventura
Eclectic Randomness
![]() Join date: 18 Jul 2006
Posts: 2,579
|
05-20-2008 10:02
well I definitely have some uses in mind for it.. but it's hardly some kind of "big secret".. it was something I noticed while poking around in the wiki rules for llSetTextureAnim... the idea of a smoothly animating framed texture.
It's all about application really. If they're trick little marquee signs in your shop, or cool GTA-Style "pager scrollers" on a HUD.. I've got an old "I'm writing a script and can't see you" gadget that's probably going to get a bit of an upgrade now. As a programmer friend of mine pointed out, it's the kind of thing where you either have to anticipate every possible use, or provide the customers with a "blank template" if you plan to use it in a commercial sign product. For scrolling text on a product, you know almost every use you're going to have for text output.. it's a very controlled environment.. but for something like a "Club events marquee" you'll be uploading a new texture every time the DJ changes. But if there's things you ALWAYS find yourself saying, this is a perfect idea. "Please tip the dancers" "check out our lucky chair" whatever. As a shop owner, I think of it in the terms I've used MY XYText-like sign for.. and for the most part, the text DOESN'T change for MONTHS at a time. When I used my sign to make instore display titles (jetpacks, aircraft, etc) I removed the scripts from my messageboards once they were set. That use could have been just as easily done using the method I proposed. As for stripping the rotation script.. I reccommend keeping it in place. Aside from the fact that "slide-copying will stop the animation on the clone.. the main reason I prefer not to do that, is that things have a habit of.. well.. breaking in SL.. and 'reset scripts in selection" would be an easy fix for a sign that stopped. I'm definitely glad it's inspiring people. _____________________
![]() ● Inworld Store: http://slurl.eclectic-randomness.com ● Website: http://www.eclectic-randomness.com ● Twitter: @WinterVentura |
Johan Laurasia
Fully Rezzed
![]() Join date: 31 Oct 2006
Posts: 1,394
|
05-20-2008 19:36
Yeah, I never really viewed it as a secret rather than you just pointing out a particular use for texture animation that (at least I), hadn't considered. As far as club events and such, couldn't a texture be uploaded to a website and displayed on an html page, and in concert with the web content type of parcel media, display the texture on a prim (for displaying the texture without uploading), then animated with your little trick? That way, one could effectively do what you're suggesting without have to upload a new texture each time.
EDIT: Ok, yeah, I was able to load a web page via llParcelMediaCommandList(), and it's scrolling the web page by just fine, so, one could effectively upload and display an image full screen on a website, and scroll the web page using Winter's scroll method along with llParcelMediaCommandList() ![]() |
Winter Ventura
Eclectic Randomness
![]() Join date: 18 Jul 2006
Posts: 2,579
|
05-20-2008 23:41
Or.. you could just format some HTML on a website, to deliver the appropriate text, and then use parcelmedia to display it AS a texture.
_____________________
![]() ● Inworld Store: http://slurl.eclectic-randomness.com ● Website: http://www.eclectic-randomness.com ● Twitter: @WinterVentura |
Very Keynes
LSL is a Virus
Join date: 6 May 2006
Posts: 484
|
05-21-2008 08:26
Shameless plug I know
![]() _____________________
House of Keynes http://slurl.com/secondlife/Seopophang/237/151/104
![]() Romantica Yacht Club http://slurl.com/secondlife/Jeffrey/58/227/26 Salsa Romantica http://slurl.com/secondlife/Seopophang/77/91/94 |
Johan Laurasia
Fully Rezzed
![]() Join date: 31 Oct 2006
Posts: 1,394
|
05-21-2008 20:39
Or.. you could just format some HTML on a website, to deliver the appropriate text, and then use parcelmedia to display it AS a texture. Duh me.. lol |