GloriaGlitter Posted March 4, 2022 Share Posted March 4, 2022 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 More sharing options...
Rolig Loon Posted March 4, 2022 Share Posted March 4, 2022 Not a security issue at all. You just can't use llDetectedKey on an event that won't detect anything, like on_rez. Try using llGetOwner instead. 1 1 Link to comment Share on other sites More sharing options...
Quistess Alpha Posted March 5, 2022 Share Posted March 5, 2022 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)); } } } Link to comment Share on other sites More sharing options...
Rolig Loon Posted March 5, 2022 Share Posted March 5, 2022 (edited) It's a Spam Machine! 😁 Edited March 5, 2022 by Rolig Loon Link to comment Share on other sites More sharing options...
GloriaGlitter Posted March 5, 2022 Author Share Posted March 5, 2022 yup - llGetOwner() did the trick, thanks. Link to comment Share on other sites More sharing options...
Recommended Posts
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