Script Reset
Posted: Fri Apr 26, 2013 4:33 pm
I have an issue with a Region Map to where when my world starts up, the map is blank and I need to edit and reset the script in order to see the region map on the prim. A solution I came up with would be to put in a script that resets the other scripts in a prim when the world starts. I found this script:
Can someone help me figure out how to clean/edit the script to reset the other scripts when the world starts up?
Code: Select all
Reset()
{
integer N = llGetInventoryNumber(INVENTORY_SCRIPT) ;
integer I = 0 ;
string MyName = llGetScriptName() ;
for ( ; I < N ; I++)
{
string Name = llGetInventoryName(INVENTORY_SCRIPT, I) ;
if (Name != MyName)
{
llResetOtherScript(Name) ;
}
}
}
default
{
on_rez(integer p)
{
Reset() ;
}
state_entry()
{
Reset() ;
}
attach(key ID)
{
Reset() ;
}
changed(integer Change)
{
if (Change & CHANGED_TELEPORT)
Reset() ;
if (Change & CHANGED_REGION)
Reset() ;
}
}