|
salar Watson
Registered User
Join date: 5 Jul 2006
Posts: 8
|
09-05-2007 12:10
Hi
I spent a lot of time today trying to find paid or free script to create a board just like Sun Microsystem's Public Sand Box where the training is done with a board showing number of buttons and on changing the buttons the texture of the main prim changes.
This is a fantastic way of going through a training process.
I am happy to pay for such a script or perhaps write one if anone has pointers.
Regards
Salar
|
|
Qie Niangao
Coin-operated
Join date: 24 May 2006
Posts: 7,138
|
09-05-2007 13:33
I went to that sandbox today to see what the displays were. I never know what's already available, so it's certainly possible that somebody has a product or even a Library script like this. But anyway, what I found there looks pretty simple--the main thing I'd be inclined to change is to make it more easily customizable... well, and to cut down the script count a bit.
It appears that the root prim of each display contains a list of the keys of all the page textures that could be displayed, and another list of indices into the page texture list, corresponding to "Chapter 1", "Chapter 2", etc. The script really only has to keep track of the index of the current page, so it can "Page Forward" and "Page Back".
As it's currently scripted, the individual "Chapter" buttons are evidently scripted to send a link message to the root prim, telling it to jump to the corresponding page and llSetTexture itself to the corresponding texture. The buttons themselves might get their labels textured by those scripts, or (more likely) those labels might just be applied in the editor.
What I'd do to make it more easily customized is to read in the display texture list from a notecard, one line per page in sequence, each line containing either the name of a texture contained in the root prim or the key of a texture (which wouldn't have to be in the prim). Some lines would also have a keyword indicating what "chapter" started at that texture.
I'd also lose the scripts in the buttons, and instead figure out which button was pressed using llDetectedLinkNumber in the root prim script. Probably the simplest approach there would be to use llGetLinkName on whatever link number was touched, and use the prim names of the buttons to match against the chapter-naming keywords. And, I guess, special button prim names for Page Forward, Page Back, and Reset (which resets the script, displaying the first page).
At least for the application at the sandbox, the page-texture list wouldn't seem to be long enough to push memory limits, but if that got to be a problem it would be easy enough to make a separate, memory-only script just for that list.
That's about all that's involved, I think, so not a bad project with which to get some scripting experience.
|
|
salar Watson
Registered User
Join date: 5 Jul 2006
Posts: 8
|
09-06-2007 06:56
From: Qie Niangao That's about all that's involved, I think, so not a bad project with which to get some scripting experience.
Many thanks Qui Great overview of how they have done this. I guess beign Sun Microsystem with teams of great Software Engineers - this must have been an easy task for them'' We will attempt a simpler versin and post here with the outcome. Salar
|
|
Lyn Mimistrobell
(waiting)
Join date: 11 Jan 2007
Posts: 179
|
09-06-2007 10:28
I recently created a script for someone that loads the next texture on touch. Textures are ordered alphabetically (so you could name them "01 start", "02 intro", etc), and only accepts the owner's touch. It's very simple. IM me inworld if you want a copy.
|
|
salar Watson
Registered User
Join date: 5 Jul 2006
Posts: 8
|
09-07-2007 09:21
From: Lyn Mimistrobell I recently created a script for someone that loads the next texture on touch. Textures are ordered alphabetically (so you could name them "01 start", "02 intro", etc), and only accepts the owner's touch. It's very simple. IM me inworld if you want a copy. Many thanks Lyn I will - I am getting deeper in scripting. And enjoying it right now. Salar
|