|
Androclese Antonelli
Org. B-Day: 05/11/04
Join date: 25 Apr 2006
Posts: 96
|
05-03-2006 07:58
I checked the Wiki's but I didn't find anything. There is a function that allows a user to change the media stream without having the edit the land directly? Edit: Nevermind... it always happens.. I find it right after I ask for help. http://secondlife.com/badgeo/wakka.php?wakka=llSetParcelMusicURL
_____________________
The Sculpted Garden Originally Born 5/11/2004 - New AV, Old Player. If you leave the game, don't delete your account, just make it 'free'. You'll lose your inventory like I did. *sniff*
|
|
Neb Soyer
Really good looking.
Join date: 9 Apr 2006
Posts: 45
|
05-03-2006 08:21
The same happens to me all the time, must be a condition spreading around.
(By the way, If you need help using the function I'd be happy to help.)
_____________________
down in the ghetto.
|
|
Androclese Antonelli
Org. B-Day: 05/11/04
Join date: 25 Apr 2006
Posts: 96
|
05-03-2006 08:34
From: Neb Soyer The same happens to me all the time, must be a condition spreading around. (By the way, If you need help using the function I'd be happy to help.) HA. I've been plagued with it all me life. It doesn't matter if I wait to post, I still won't find what I need until "Submit" has been pressed. I've got the script down, thanks. I'm plugging it into a Dialog so I can changer stations on the fly and I dont' have to go look up the steams everytime a boring song comes on. Thanks!
_____________________
The Sculpted Garden Originally Born 5/11/2004 - New AV, Old Player. If you leave the game, don't delete your account, just make it 'free'. You'll lose your inventory like I did. *sniff*
|
|
Neb Soyer
Really good looking.
Join date: 9 Apr 2006
Posts: 45
|
05-03-2006 08:35
From: Androclese Antonelli HA. I've been plagued with it all me life. It doesn't matter if I wait to post, I still won't find what I need until "Submit" has been pressed.
I've got the script down, thanks. I'm plugging it into a Dialog so I can changer stations on the fly and I dont' have to go look up the steams everytime a boring song comes on.
Thanks! Good stuff. 
_____________________
down in the ghetto.
|
|
Androclese Antonelli
Org. B-Day: 05/11/04
Join date: 25 Apr 2006
Posts: 96
|
05-03-2006 09:10
For those that are interested, here is what I threw together. The dialog script was originally written by another person, I just find it very useful for all my projects. While not on topic to this thread, you can use this to expand out our steaming options by breaking the stations down by Genere in the MENU_MAIN list and then each station for each genere in a new list. MENU_ROCK for instance. I hope this helps somebody out. integer MENU_HANDLE; integer MENU_CHANNEL; key owner; // Set the menu options list MENU_MAIN = ["Radio"]; list MENU_RADIO = ["WLS AM", "99.9 FM", ".997 80's"]; string RADIO_1 = "http://abcrad.ic.llnwd.net/stream/abcrad_wls_lo"; string RADIO_2 = "http://newsweb.ic.llnwd.net/stream/newsweb_live"; string RADIO_3 = "http://64.236.34.196/stream/1040"; //make dialog easy, pick a channel by itself and destroy it after 5 seconds menu (key user,string title,list buttons) { MENU_CHANNEL = llFloor(llFrand(-99999.0)); MENU_HANDLE = llListen(MENU_CHANNEL,"","",""); llDialog(user,title,buttons,MENU_CHANNEL); llSetTimerEvent(5.0); } default { touch_start(integer t) { owner = llGetOwner(); if ( owner == llDetectedOwner(0) ) { menu(llGetOwner(),"Select a Menu", MENU_MAIN); } } timer() { //so the menu timeout and close its listener llSetTimerEvent(0.0); llListenRemove(MENU_HANDLE); } listen(integer channel,string name,key id,string message) { //in case you have others listeners if (channel == MENU_CHANNEL) { // The Radio submenu if(message == "Radio") { menu(llGetOwner(),"Radio Steam Menu", MENU_RADIO); } // WLS AM if(message == "WLS AM") { llOwnerSay("Changing to WLS AM..."); llSetParcelMusicURL(RADIO_1); llOwnerSay("Done. Enjoy the Music!"); } // 99.9 FM if(message == "99.9 FM") { llOwnerSay("Changing to 99.9 FM..."); llSetParcelMusicURL(RADIO_2); llOwnerSay("Done. Enjoy the Music!"); } // .997 80's if(message == ".997 80's") { llOwnerSay("Changing to .997 80's Stream..."); llSetParcelMusicURL(RADIO_3); llOwnerSay("Done. Enjoy the Music!"); } } } }
_____________________
The Sculpted Garden Originally Born 5/11/2004 - New AV, Old Player. If you leave the game, don't delete your account, just make it 'free'. You'll lose your inventory like I did. *sniff*
|
|
Talarus Luan
Ancient Archaean Dragon
Join date: 18 Mar 2006
Posts: 4,831
|
05-03-2006 10:32
Though it is really just an aesthetic coding suggestion, I would put the URLs in another list, then use llListFindList to get the index of the user's selection in the first list, and use the returned index to get the URL from the second list (if it wasn't -1). Makes more practical sense for larger lists, but I thought I would share it anyway,  Alternatively, you could put the names and the URLs in the same list,, strided, and use llListFindList using the returned index plus one to get the URL.
|