DelizaLove Posted December 22, 2014 Share Posted December 22, 2014 I found some code where I can touch to get the content, but Im putting it into a new prim where I want them to touch to get a notecard and a landmark. When I click it the menu comes up with "object". No details what it is.How can I fix that ? Code used is thislist gInventoryList;list getInventoryList(){integer i;integer n = llGetInventoryNumber(INVENTORY_ALL);list result = [];for( i = 0; i < n; i++ ){result += [ llGetInventoryName(INVENTORY_ALL, i) ];}return result;}default{state_entry(){gInventoryList = getInventoryList();}touch_start( integer n ){integer i;for( i = 0; i < n; i++ ){llGiveInventoryList(llDetectedKey(i), llGetObjectName(), gInventoryList );}}changed( integer change ){if ( change == CHANGED_INVENTORY )gInventoryList = getInventoryList();}} Link to comment Share on other sites More sharing options...
Rolig Loon Posted December 22, 2014 Share Posted December 22, 2014 Your menu gives the person who touches the vendor a folder that contains a copy of everything in the vendor's contents, including a copy of this script. The folder has the same name as the vendor that has this script in it. I assume that name is "Object". If you want it to have a different name, either rename your vendor or modify the script. Link to comment Share on other sites More sharing options...
DelizaLove Posted December 22, 2014 Author Share Posted December 22, 2014 It helped by renmaing the prim. How can I prevent the one who touches to get the script ? Link to comment Share on other sites More sharing options...
Rolig Loon Posted December 22, 2014 Share Posted December 22, 2014 In your user defined function at the top of the script, modify the loop that loads the list by adding a filter to exclude the script... for( i = 0; i < n; i++ ){ if (llGetInventoryName(INVENTORY_ALL,i) != llGetScriptName()) //Add this bit { // And this bracket result += [ llGetInventoryName(INVENTORY_ALL, i) ]; } // And don't forget this one} Now would be a good time to start working through some LSL tutorials ...... :smileywink: Link to comment Share on other sites More sharing options...
DelizaLove Posted December 23, 2014 Author Share Posted December 23, 2014 thanks that worked! I will do some tutorials now 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