Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

Overwriting Inventory Objects

Idaho Merryman
Registered User
Join date: 30 Sep 2007
Posts: 19
03-15-2008 13:27
Builders


Say I create a door object and save it to my inventory. Later I come back and want to improve it. I drag it from my inventory, do some work (insert a window for example) and then I want to save it back to my inventory ... I can either 'Take' the object, in which case it dissapears from the land and appears in my inventory or 'Take a copy' when I copy to inventory but the object stays on the land ... either way I then end up with two objects of the same name in my inventory.

What I really want to do is just save the object back to the inventory with the same name, as the same (altered) object. Is it possible to simply update the state of an object (overwrite it). In fact I want to save the state every few minutes or so (in case my router drops the line for example) but doing this ends up with many objects of the same name and I have no idea which is the latest one apart from the fact that the latest one appears to be at the top of the list

Is there a way to update an object without creating a new one ?

Thanks
Idaho
Rolig Loon
Not as dumb as I look
Join date: 22 Mar 2007
Posts: 2,482
03-15-2008 14:58
It's actually pretty convenient that you do end up with a stack of copies in inventory. As you noted, they are the successive states of your work, and they are always stacked in chronological order -- newest on top. If you screw up somewhere along the way and need a "do over," or if you just want to explore different ways of making an object, it's very handy to have those copies. When you're all done and are sure that you don't need them any more, simply delete them. If you're REALLY smart, create a temporary folder and put your very first copy in it. Then all successive copies will be in that folder -- easy to find and easy to deal with later.
Ollj Oh
Registered User
Join date: 28 Aug 2007
Posts: 522
03-15-2008 22:03
//my default scripts set object name on state entry (triggered on every script compile/reset) and include version, free memory and timestamp (for sorting):
string name= "script-name 2" //first word is a script name, second WORD is a version number

state_entry(){
llSetObjectName(name+".";(string)llGetFreemory()+"~"+llGetTimestamp( ));
llOwnerSay ("se";); //says "state entry", with its NAME already set, its also like a clock that tells you how large your script is now.
}
//http://wiki.secondlife.com/wiki/Category:LSL_Time
//http://wiki.secondlife.com/wiki/LlGetFreeMemory
Idaho Merryman
Registered User
Join date: 30 Sep 2007
Posts: 19
03-16-2008 01:47
From: Rolig Loon
It's actually pretty convenient that you do end up with a stack of copies in inventory....


After a bit more messing about I agree with you ... it's really quite a good idea to have all your prevoius versions available to you, I'm converted.