I'd like to leave it "open" so anyone can change channels, not just a member of a specified group.
integer channel; //What channel are we on?
integer maxChannels = 4; //Set here the total number of channels.
string hoverText; //For text that floats above the radio.
default
{
state_entry()
{
channel = 0;
}
touch_start(integer total_number)
{
channel = channel + 1; //Increment the channel by one each touch.
if (channel > maxChannels) //Then reset channel to 1.
{
channel = 1;
}
if (channel == 1)
{
llSetParcelMusicURL("http://128.118.86.117:8000/"
;hoverText = "Click me to change channels.\nNow playing WPSU.";
llSetText(hoverText,<0,1,0>,1);
}
if (channel == 2)
{
llSetParcelMusicURL("http://146.186.221.181:8000"
;hoverText = "Click me to change channels.\nNow playing The LION.";
llSetText(hoverText,<0,1,0>,1);
}
if (channel == 3)
{
llSetParcelMusicURL("http://128.118.86.117:800"
;hoverText = "Click me to change channels.\nNow playing NPR Folk Jazz.";
llSetText(hoverText,<0,1,0>,1);
}
if (channel == 4)
{
llSetParcelMusicURL("http://205.188.215.232:8014"
;hoverText = "Click me to change channels.\nNow playing Classical Guitar.";
llSetText(hoverText,<0,1,0>,1);
}
}
}