LSL: Notecard Selector
Posted: March 17, 2008 | Author: hilary | Filed under: blog | Tags: library, library script, lsl, lsl script, script, second life, social networking, virtual worlds | 15 Comments »
One of my friendly librarian colleagues in SL asked if I had a script to generate dialogs and allow users to select notecards handy. I didn’t, so I coded it up. It seems like it could be useful to others, so here you go:
This script is in LSL, for Second Life. Just copy and paste it into a script, throw a few notecards into the object, and you’ll be ready to go!
// Notecard Selector
// by Ann Enigma
// This script presents users with a list of notecards in a dialog box, and allows them to select one
// Note: The names of the notecards must be less than 24 characters long
// This script is licenced under a Creative Commons Attribution-Noncommercial-Share Alike 3.0 United States License
// http://creativecommons.org/licenses/by-nc-sa/3.0/us/
// configurable options
string message = "Which notecard would you like to read?"; // the message on the dialog box
integer command_channel = 616; // the channel on which to listen for commands (you probably won't need to change this)
// the script
list notecards;
default
{
state_entry() {
integer i = 0;
// read the title of each notecard into a list
for(i=0;i