2toe Bigboots Posted June 20, 2011 Share Posted June 20, 2011 Is there a way to have a script to get rid or a cerin notecard when it recieves the same nameSay i have Object A it has notecard config in itAnd object B sends object A a note card Configi want object a to only read the new note card Link to comment Share on other sites More sharing options...
Slvr2 Torii Posted June 20, 2011 Share Posted June 20, 2011 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 More sharing options...
2toe Bigboots Posted June 20, 2011 Author Share Posted June 20, 2011 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 ? Link to comment Share on other sites More sharing options...
Darkie Minotaur Posted June 20, 2011 Share Posted June 20, 2011 llRemoveInventory Link to comment Share on other sites More sharing options...
Slvr2 Torii Posted June 20, 2011 Share Posted June 20, 2011 2toe Bigboots wrote: oKAY SO HOW WOULD I HAVE THE OBJECT GET RID OF THE OLD ONE BEFORE SENDING THE NEW ONE ? Use llRemoveInventory Link to comment Share on other sites More sharing options...
2toe Bigboots Posted June 20, 2011 Author Share Posted June 20, 2011 Wow thats easy sweet Link to comment Share on other sites More sharing options...
2toe Bigboots Posted June 20, 2011 Author Share Posted June 20, 2011 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 ?? Link to comment Share on other sites More sharing options...
Darkie Minotaur Posted June 20, 2011 Share Posted June 20, 2011 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 Link to comment Share on other sites More sharing options...
Rolig Loon Posted June 20, 2011 Share Posted June 20, 2011 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. 1 Link to comment Share on other sites More sharing options...
2toe Bigboots Posted June 20, 2011 Author Share Posted June 20, 2011 Tweeled it a little bit but gread idea, thank you. Link to comment Share on other sites More sharing options...
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now