Jump to content

Change Object Name


FairreLilette
 Share

You are about to reply to a thread that has been inactive for 1830 days.

Please take a moment to consider if this thread is worth bumping.

Recommended Posts

Hi,

My question is:  Is there a script that could change an object's name?

For instance, I am wondering if there is a script that could change a Gacha's name to retired when it retires.

Again, for instance, say Gacha's set the script with a time for when the object will retire and then (because of the script) the object's name would change into blah, blah, blah ________________________ fill in the blank (retired).

Link to comment
Share on other sites

2 minutes ago, Rolig Loon said:

But only if the object is rezzed in world.  You cannot change the name of an object in inventory or in the contents of a rezzer.

I assumed a counter or message would delete the invent object. Maybe i was thing further ahead than that.

Link to comment
Share on other sites

2 minutes ago, Rolig Loon said:

It could.  I wasn't assuming that the OP had thought that far ahead.  I just wanted to be sure she understood that she couldn't actually change the name of anything with a script unless it was rezzed in world.

I never considered that. Oops.

Link to comment
Share on other sites

2 minutes ago, KT Kingsley said:

Does this mean I can't modify anything I buy in any way even if it has modify permissions? Or just that I can't invert stuff even if it has modify permissions? Which I can't. Except, I think, sculpted prims?

Mirror objects of mesh are blocked. You can mod it as much as you like, assuming the creator has allowed it.

Link to comment
Share on other sites

 

7 minutes ago, KT Kingsley said:

Does this mean I can't modify anything I buy in any way even if it has modify permissions? Or just that I can't invert stuff even if it has modify permissions? Which I can't. Except, I think, sculpted prims?

Oops, wrong thread.

Link to comment
Share on other sites

19 hours ago, steph Arnott said:

I assumed a counter or message would delete the invent object. 

Hi, thanks for the replies thus far.  

I don't understand this comment in regards to a name change.

You mean if the object's name is changed by a script, it would be deleted?  Why?

That's okay if it changes only on rez.  I think it's a great idea to have Gacha's that change their name to retired BUT not if they delete themselves...of course.  So, I don't understand this comment above.

Link to comment
Share on other sites

11 minutes ago, FairreLilette said:

Hi, thanks for the replies thus far.  

I don't understand this comment in regards to a name change.

You mean if the object's name is changed by a script, it would be deleted?  Why?

That's okay if it changes only on rez.  I think it's a great idea to have Gacha's that change their name to retired BUT not if they delete themselves...of course.  So, I don't understand this comment above.

You can not change an objects name by a script while it is un-rezzed, ie it is in the inventory. You can only manually do it.

Link to comment
Share on other sites

Quite simply, you cannot change an object's name in the rezzer's inventory but you could maybe find a way to delete the object completely and replace it with a new object that has a different name.  I have no idea what your situation looks like, but you might have a rezzer that contains two kinds of objects -- A and B. It  gives  Object A until it has offered it 10 times, then starts giving Object B instead. Or, as Steph is suggesting, you could script your rezzer to give out copies of whatever is in its inventory, but manually drop a new object into it from time to time.  If your script was designed to delete whatever was there before, it would look like you had changed the name in inventory, when you had actually replaced it.

Link to comment
Share on other sites

3 hours ago, Rolig Loon said:

Quite simply, you cannot change an object's name in the rezzer's inventory but you could maybe find a way to delete the object completely and replace it with a new object that has a different name.  I have no idea what your situation looks like, but you might have a rezzer that contains two kinds of objects -- A and B. It  gives  Object A until it has offered it 10 times, then starts giving Object B instead. Or, as Steph is suggesting, you could script your rezzer to give out copies of whatever is in its inventory, but manually drop a new object into it from time to time.  If your script was designed to delete whatever was there before, it would look like you had changed the name in inventory, when you had actually replaced it.

Okay, I am newbie to scripting and only have about a month or less experience.  So, I don't understand much of the lingo.

I thought it could be changed but up above it never said manually.  If the object is modify, the owner could just change it to retired by writing it in...no need for a script.  A lot of Gachas are modify as well as transfer.  

So, the replacement idea...well, that would be sort of an update by the creator to send a new object when the Gacha item retired then...or something like that.  

 

EDIT IN:   Perhaps a hover script could be added that when the object is clicked on it says the retirement date.

And, perhaps I should have asked this question..."How Do You Know When A Gacha Item is Retired?"

Edited by FairreLilette
Link to comment
Share on other sites

9 minutes ago, FairreLilette said:

So, the replacement idea...well, that would be sort of an update by the creator to send a new object when the Gacha item retired then...or something like that.  

Yup. and you could do that many different ways.  In fact, you could do it with LSL in the very specific way that merchants use product updaters to push new versions of their products to customers.  As a very simple example, you could write the changed event in a script in your rezzer to look something like this:   

    changed (integer change)
    {
        if (change & (CHANGED_INVENTORY | CHANGED_ALLOWED_DROP))
        {
            if (llGetInventoryNumber(INVENTORY_OBJECT) > 1 )
            {
                llRemoveInventory(strObj);     // Remove previous object
                llSleep(0.5);
            }
            llSay(0,"\nInventory change: re-initializing....");
            llResetScript();
        }
    }

If you keep track of the name of the current object in the rezzer -- the global variable strObj in this example -- then you have a way to automatically delete whatever was in the rezzer each time you add something new.  Then you can either add the new object manually (by dropping it onto the rezzer, maybe) or by sending it with llGiveInventory. The function llRemoteLoadScriptPin allows you do do something similar by pushing an updated version of a script to a customer's object.  These things can be more than a little confusing for a new LSL scripter but can be powerful tools to know about.

Link to comment
Share on other sites

40 minutes ago, FairreLilette said:

"How Do You Know When A Gacha Item is Retired?"

Which "you"?  If you mean"you, the customer," you either put a sign over the vendor or you just disable it. If you mean "you, the merchant," yo send an IM or an e-mail note.  In either case. you just keep a counter running in the vendor script to keep track of how many no-copy objects are left in it.  When the counter drops to zero, there's nothing left.

Link to comment
Share on other sites

You are about to reply to a thread that has been inactive for 1830 days.

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
 Share

×
×
  • Create New...