Who Is Online

1
Online

Tuesday, 25 September 2018 18:23

Radio Script

list stations = [ ]; // add station URLs here between the [ ] in quotes seperated by commas "url1", "url2", "url3"....
list station_descriptions = [ ];  // add station descriptions here between the [ ] in quotes seperated by commas... they should be in the same order as the urls they describe, you can use "" for any of them if you do not wish to add a description.
list djs = [ ];  // add the names of those authorized to change stations here between the [ ] in quotes seperated by commas
integer current_station = -1;

default
{
    state_entry()
    {
        current_station = -1;
    }

    on_rez(integer start_param)
    {
        llResetScript();
    }
    
    touch_start(integer total_number)
    {
        if(llListFindList(djs, (list)llKey2Name(llDetectedKey(0))) != -1)
        {
            current_station++;
            if(current_station >= llGetListLength(stations))
                current_station = 0;
            llSetTimerEvent(3);
            llWhisper(0, "Now Playing Station " + (string)current_station + ": " + llList2String(station_descriptions, current_station));
        }
    }
    
    timer()
    {
        llSetParcelMusicURL(llList2String(stations, current_station));
        llSetTimerEvent(0);
    }
}

 

Flash Scratch to SL - Your Scripting Tool

Script ImageNeed to write a LSL script and don't know how to script?  I know I hate trying to get my head around LSLS when I an in a time crunch. So why not give Flash Scratch a try! Its a great tool for learning and scoding your own scripts for Second Life without having to pay someone to do it and without a crash course in LSL

A Huge thanks to John Bennet of ATLAS Institute at University of Colorado and Eric Rosenbaum at MIT for writing Scratch for SL to begin with.

Read more: Flash Scratch to SL - Your Scripting Tool