Jump to content

Give Notecard on rez


GloriaGlitter
 Share

You are about to reply to a thread that has been inactive for 811 days.

Please take a moment to consider if this thread is worth bumping.

Recommended Posts

Hi everyione - I wanted a simple script that offered a user a 'read me' notecard when they rezzed an object from inventory.  I expected the following to work but was surprised that it didn't.  Is it a security concern that prevents giving inventory on rez?


    on_rez(integer i)
     {
       llGiveInventory(llDetectedKey(0),llGetInventoryName(INVENTORY_NOTECARD, 0));
     }
    
   

 

 

Link to comment
Share on other sites

I have no idea why someone would want to do this, but if you wanted to be silly and give a notecard to everyone in say, 10 meters of the newly rezzed object. . .

default {
  on_rez(integer i)
  { llSensor("","",AGENT,10.0,PI);
  }
  sensor(integer n)
  { while(~--n)
    { llGiveInventory(llDetectedKey(n),llGetInventoryName(INVENTORY_NOTECARD, 0));
    }
  }
}

:P

Link to comment
Share on other sites

You are about to reply to a thread that has been inactive for 811 days.

Please take a moment to consider if this thread is worth bumping.

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
 Share

×
×
  • Create New...