Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

Changed Description

Rex Tardis
How did I get here?
Join date: 8 Nov 2005
Posts: 24
10-18-2007 08:13
I can't seem to find where a script can sense if the description of prim has been changed. It's not on the changed event specs in the documentation.

I'm wanting my script to reset if something in the description gets changed.

Any ideas?
Qie Niangao
Coin-operated
Join date: 24 May 2006
Posts: 7,138
10-18-2007 09:15
Afraid it's gonna have to be a timer-polling thing.
From: http://lslwiki.net/lslwiki/wakka.php?wakka=changed
[...] the changed() event is also not triggered:

* when an object changes position. (Use moving_start() and moving_end().)
* when an object changes rotation.
* when changing the object's name or description.
[...]
Aniam Ingmann
llOwnage(float pwnage);
Join date: 22 Oct 2005
Posts: 206
10-18-2007 15:11
Yeah I made a vending script using the description for the pricing and name; but i set it to reset when the user says reset; so you can just have them have to say reset when it's time to reset. It's not too bad.
_____________________
From: someone

Don't worry, Aniam is here!
- Noob
Jesse Barnett
500,000 scoville units
Join date: 21 May 2006
Posts: 4,160
10-18-2007 16:24
CODE

string desc;

default
{
state_entry()
{
desc = llGetObjectDesc();
}
touch_start(integer total_number)
{
string desc_test = llGetObjectDesc();
if(desc != desc_test){
llOwnerSay("Resetting. Please touch again");
llResetScript();
}
}
}

You would do an if test like this before the function that uses the object description in the script. It could be used in any event such as a listen, touch(as shown), volume detect etc. The only place it would'nt work is if you actually needed to use the object description in the state_entry itself(But then again, you wouldn't need to test it there:) ).
_____________________
I (who is a she not a he) reserve the right to exercise selective comprehension of the OP's question at anytime.
From: someone
I am still around, just no longer here. See you across the aisle. Hope LL burns in hell for archiving this forum