Difference between revisions of "LlSetParcelMusicURL"

From Second Life Wiki
Jump to navigation Jump to search
(Added example.)
Line 9: Line 9:
|caveats
|caveats
|constants
|constants
|examples
|examples=
<lsl>// This script changes the music URL based on time of day.
 
integer night = FALSE;
string nighturl = "http://205.188.215.228:8006";
string dayurl = "http://208.122.59.30:7156";
 
default
{
    state_entry()
    {
        llSetTimerEvent(10);
    }
   
    timer()
    {
        vector pos = llGetSunDirection();
       
        if ((pos.z < -.75) != night)
        {
            night = !night;
            if (night)
            {
                llSetParcelMusicURL(nighturl);
            }
            else
            {
                llSetParcelMusicURL(dayurl); 
            }
        }
    }
}</lsl>
|helpers
|helpers
|also_functions
|also_functions

Revision as of 10:38, 8 April 2008

Summary

Function: llSetParcelMusicURL( string url );

Sets the streaming audio URL for the parcel object is on

• string url

The object owner must also be the land owner. If the land is deeded to a group the object will need to be deeded to the same group for this function to work.

Caveats

  • This function causes the script to sleep for 2.0 seconds.
All Issues ~ Search JIRA for related Bugs

Examples

<lsl>// This script changes the music URL based on time of day.

integer night = FALSE; string nighturl = "http://205.188.215.228:8006"; string dayurl = "http://208.122.59.30:7156";

default {

   state_entry()
   {
       llSetTimerEvent(10);
   }
   
   timer()
   {
       vector pos = llGetSunDirection();
       
       if ((pos.z < -.75) != night)
       {
           night = !night;
           if (night)
           {
               llSetParcelMusicURL(nighturl);
           }
           else
           {
               llSetParcelMusicURL(dayurl);   
           }
       } 
   }
}</lsl>

Deep Notes

Search JIRA for related Issues

Signature

function void llSetParcelMusicURL( string url );