Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

SetParcelMusicURL Question

Mitzie Mohr
Registered User
Join date: 10 Feb 2007
Posts: 10
11-27-2007 09:38
I have an object that contains the following script:

string song = "http://1c1.sc.liquidcompas.cc:9028"

default
{
state_entry()
llSetParcelMusicURL(song);
}
}

It works fine for setting my land, but when I give it to someone, they have to open the script in the object and hit "RESET" for it to work on their land. What am I missing?

Thanks!
Debbie Trilling
Our Lady of Peenemünde
Join date: 17 Oct 2006
Posts: 434
11-27-2007 09:46
Within default add:

From: someone


on_rez(integer Params}
{
llResetScript();
}



This will cause the script to reset every time it's object is rezzed.

You could also add:

From: someone


changed( integer change )
{
if(change & CHANGED_OWNER )
{
// reset script on change of owner
llResetScript();
}
}



which causes the script to reset on change of owner.

Good luck :)
Eragon Writer
Registered User
Join date: 30 May 2007
Posts: 6
Help - (Reset Script)
12-17-2007 18:59
I would like for this script to reset every few minutes ... Can someone please put this in this code... I have gone crazy searching it.
Needs to reset every 60 , 90, or 120 seconds.
Or longer ..please help with this simple code.

default
{
state_entry()
{
llVolumeDetect(TRUE); //set clear
}
collision_start(integer total_number)
{
llSetTimerEvent(10.0); // generate a timer event every 10 second
}
timer()
{
llVolumeDetect(FALSE); // set solid
}
}
Void Singer
Int vSelf = Sing(void);
Join date: 24 Sep 2005
Posts: 6,973
12-17-2007 21:15
since you're already running a timer just insert a global variable that increments each time, test when it reaches 2 then call reset
_____________________
|
| . "Cat-Like Typing Detected"
| . This post may contain errors in logic, spelling, and
| . grammar known to the SL populace to cause confusion
|
| - Please Use PHP tags when posting scripts/code, Thanks.
| - Can't See PHP or URL Tags Correctly? Check Out This Link...
| -