Jump to content

Skye Bizet

Resident
  • Posts

    3
  • Joined

  • Last visited

Posts posted by Skye Bizet

  1. I am trying to create a script that rezzes 75 prims - link them and break the link from the root prim. I get a script error after linking 64 prims 'Script trying to link but permissions or target are invalid!'

    I searched the forum on this problem and found a thread  In the answer it is suggested not to link all prims at the 'same time'. Good thought, but I have no idea how to build in a delay or how to change the script so it would rez only 64 prims - link them - rez the next 15 and link those too.

    I give an example of my script (simplyfied so I rez only 3 prims) but this gives an idea of what I want.

    integer createdObjectCounter;
    integer linkedObjectCounter;
    
    default
    {
        state_entry()
        {
      
             
        linkedObjectCounter = 0;  
        }
    
        touch_start(integer total_number)
        {
            if( createdObjectCounter <= 0 )  
            {                              
                
               
               llRequestPermissions( llGetOwner(), PERMISSION_CHANGE_LINKS ); 
    llOwnerSay( "Make sure a Prim (Object) is placed in my contents. Close the edit screen and click the me. Give Permission in the menu" );
            }
            else  
            {     
               
            }
        }
    
        run_time_permissions( integer permissions_granted )
        {
           if( permissions_granted == PERMISSION_CHANGE_LINKS ) 
        {
    
        llOwnerSay("Starts");
        
    llRezObject("Object", llGetPos() + < 0.0,  0.0, 0.0  >, ZERO_VECTOR, llEuler2Rot(< 1.0, 0.0, 0.0 >*DEG_TO_RAD), 10);
    createdObjectCounter = createdObjectCounter + 1;
    llRezObject("Object", llGetPos() + < 0.0,  0.0, 0.0  >, ZERO_VECTOR, llEuler2Rot(< 0.0, 1.0, 0.0 >*DEG_TO_RAD), 10);
    createdObjectCounter = createdObjectCounter + 1;
    llRezObject("Object", llGetPos() + < 0.0,  0.0, 0.0  >, ZERO_VECTOR, llEuler2Rot(< 0.0, 0.0, 1.0 >*DEG_TO_RAD), 10);
    
              
           }
           else
           {
               llOwnerSay( "You must give me permissions to link." );
               return;
           }
        }
    
        object_rez( key child_id )
        {
             llCreateLink( child_id, TRUE ); 
    
     
            linkedObjectCounter++;
            if( linkedObjectCounter >=3 ) 
            {
                
      
            llBreakLink( 1 );
    
            
              llOwnerSay( "Done" );
            
              llResetScript();
    
    
            }
        }
    }

     Does anyone have a suggestion on how to solve this problem? 

×
×
  • Create New...