Script Reset

Creating scripts
Post Reply
User avatar
ShowStopper Eclipse
Posts: 44
Joined: Sat Apr 20, 2013 9:02 pm
Has thanked: 12 times
Been thanked: 15 times
Contact:

Script Reset

Post by ShowStopper Eclipse »

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:

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() ;
    }
}
Can someone help me figure out how to clean/edit the script to reset the other scripts when the world starts up?
Post Reply