Ian Berensohn
Registered User
Join date: 15 May 2008
Posts: 35
|
09-29-2009 18:53
I've been trying to make a script that, when clicked, prompts the user to enter a new music URL in CHAT to change the music stream. I've seen these in use and they're cool for venues that use live players to make it easy to swap out streams without giving land perms but so far, I've had little luck trying to write it. I've been trying to use logic to amend a public script that changes the media based on time of day but am getting nowhere fast. Thank you for any help 
|
Ruthven Willenov
Darkness in your light
Join date: 16 Jan 2008
Posts: 965
|
09-29-2009 19:23
that should be fairly easy. the object needs to have the same owner as the land, so if it's group land, the object needs to be deeded to the group. you can turn on a listen that listens to only the id for a specified amount of time on a specific channel. when it hears the message you can use llSetParcelMusicURL to set it here's a very basic one that should do the trick key id; default { state_entry() { llSetText("Touch Me and Say a\nMusic url within 30 seconds",<1.0,1.0,1.0>,1.0); }
touch_start(integer total_number) { id = llDetectedKey(0); llListen(0,"",id,""); llSetTimerEvent(30.0); llInstantMessage(id,"Say the url within 30 seconds"); } listen(integer c, string n, key id, string m) { llSetParcelMusicURL(m); llResetScript(); } timer() { llInstantMessage(id,"You took too long, touch me and try again"); llResetScript(); } }
|
Ian Berensohn
Registered User
Join date: 15 May 2008
Posts: 35
|
Thank yoiu!
09-29-2009 20:21
Thank you very much for that!! Much appreciated! Now to study that and try to understand why it does what it does  ) Thanks again!
|