Jump to content

Deleting Object Inventory


2toe Bigboots

Recommended Posts

Unfortunately you (by you I mean the script) can't rename a notecard once you receive it.   So if a duplicate name comes in the system is going to add to the name to make it unique. 

A work around is for the sending object to send a preparation message (hey, get rid of the config notecard because I'm about to send a new one.)  Wait a bit (or wait for a confirming response message.)   Then send the new config notecard.

Link to comment
Share on other sites

Just write ....

default{     touch_start(integer num)     {          llRegionSay(-19483, ""Die, old card!"); 
llSleep(5.0);
llGiveInventory("
UUID of your Object Goes Here", llGetInventoryName(INVENTORY_NOTECARD,0)); }}

 And then have this script in your receiving object ...

default{    state_entry()     {          llListen(-19483,"","","");     }     listen (integer channel, string name, key id, string msg)     {          if(msg == "Die, old card!")          {              llRemoveInventory(llGetInventoryName(INVENTORY_NOTECARD,0));          }     }}

 Just be sure that your two scripts are in the same region.  Otherwise, you'll have to use something other than llRegionSay.

  • Like 1
Link to comment
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
×
×
  • Create New...