Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

on_rez question

Luciftias Neurocam
Ecosystem Design
Join date: 13 Oct 2005
Posts: 742
12-27-2005 07:34
Hi....I've written some chat parsing scripts for a set of items that I've given to a friend. llListen() statements are activated within the on_rez() function, and it was my understanding that so doing would insure that the object would be listening upon rezzing. Which isn't necessary, but I thought it would be one less thing to setup upon rezzing.

I put these items in a box, set permissions for copy and handed the box over to my friend.

An interesting effect insued. Some of the statements in on_rez were enacted, but none of the statements involving listening to the owner worked until I had her reset the script.

Is this some kind of anti-abuse insurance, to prevent objects from surreptitiously listening to you immediately upon rezzing? Or was my friend not properly the owner of the object until resetting the script?

Simply giving the individual objects to her didn't seem to have the same effect. Somehow bundling them into a package seemed to alter their operation.
Jillian Callahan
Rotary-winged Neko Girl
Join date: 24 Jun 2004
Posts: 3,766
12-27-2005 07:42
Listens are persistent - so I'd just set up the listen in the state_entry() event.

Then, in the changed() event, I'd do this:

CODE
changed(integer c)
{
if ( c & 128 ) llResetScript(); // reset on owner change
}

Assuming it's OK to reset the script, of course, otherwise I'd use the same event check to remove the old listen and put the new one in.
_____________________
Luciftias Neurocam
Ecosystem Design
Join date: 13 Oct 2005
Posts: 742
12-27-2005 07:52
From: Jillian Callahan
Listens are persistent - so I'd just set up the listen in the state_entry() event.

Then, in the changed() event, I'd do this:

CODE
changed(integer c)
{
if ( c & 128 ) llResetScript(); // reset on owner change
}

Assuming it's OK to reset the script, of course, otherwise I'd use the same event check to remove the old listen and put the new one in.


This could do the trick...thanks!