Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

changed(integer change)

Demien Ryba
Registered User
Join date: 12 Dec 2007
Posts: 2
12-28-2008 07:11
default
{
state_entry()
{
llSetText(llGetObjectName(), <0,1,0>, 1.0);
}
changed(integer change)
{
if (change & llGetObjectName()) // how can i change this to make it reset when objects name is changed? if that is possible
{
llResetScript();
}
}
}
Ollj Oh
Registered User
Join date: 28 Aug 2007
Posts: 522
12-28-2008 07:44
http://wiki.secondlife.com/wiki/Changed
does NOT work on object name or object description.

you need a global variable that stores the old object name and a well timed procedure:
timer(){
if (llGetObjectName()!=oldname){
llOwnerSay(oldname+"changed to"llGetObjectname);
}
oldname=llGetObjectname;
}

this procedure should not only be triggered by a timer but als on other events such as attaching,resetting,changing_owner,changing_objectdesc (for debugging)
Ron Khondji
Entirely unlike.
Join date: 6 Jan 2007
Posts: 224
12-28-2008 07:46
It's only possible if you check the name every so often using a timer.
Demien Ryba
Registered User
Join date: 12 Dec 2007
Posts: 2
12-28-2008 07:51
ok ty