Jump to content
Sign in to follow this  
2toe Bigboots

Deleting Object Inventory

Recommended Posts

Is there a way to have a script to get rid or a cerin notecard when it recieves the same name

Say i have Object A it has  notecard  config in it

And object B sends object A a note card Config

i want object a to only read the new note card

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

oKAY SO HOW WOULD I HAVE THE OBJECT GET RID OF THE OLD ONE BEFORE SENDING THE NEW ONE ?

Srry caps

 

I dont know of a function to git rid of inventory ?? can me making it no trans and having it give to a link work ?

 

Share this post


Link to post
Share on other sites


2toe Bigboots wrote:

oKAY SO HOW WOULD I HAVE THE OBJECT GET RID OF THE OLD ONE BEFORE SENDING THE NEW ONE ?

 

 

Use llRemoveInventory

Share this post


Link to post
Share on other sites

So let me know if this would be the best way

Send from update server the Romoveinventory script that will ditch the old notcard make script wait a little then send the new card ??

Share this post


Link to post
Share on other sites

Seems ok - you could check first if the script in question is there and then after the call to the llRemoveInventory you could check if it's done. This last step I would probably do before sending the new script

Share this post


Link to post
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

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this  

×
×
  • Create New...