Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

llGetOwner & Listening to Owner objects

Amanda Bedlam
Registered User
Join date: 15 Jan 2006
Posts: 2
03-24-2007 15:51
Okay, so, my problem is this. I have written two scripts, for two different prims. In one I have the llWhisper -

integer switch = TRUE;
integer time = 15;
integer a = 0;
default
{
state_entry()
{
llSetStatus(STATUS_PHANTOM,switch);
}
touch_start(integer total_number)
{
if (a == 1)
{
llSetAlpha(0.5,ALL_SIDES);
{
llWhisper(0, "One";);

a = 0;
}
}
else if (a == 0)
{
llSetAlpha(1,ALL_SIDES);
{
llWhisper(0, "Two";);

a = 1;
}
}
}
}


Now this script works, on NULL_KEY, but not on llGetOwner() like this...

default
{
state_entry()
{
llListen(0,"",llGetOwner(),"";);
}

on_rez(integer num)
{
llResetScript();
}

listen(integer number, string name, key id, string message)
{
if(message == "One";) llSetTexture("Texture One UUID", ALL_SIDES);
if(message == "Two";) llSetTexture("Texture Two UUID", ALL_SIDES);
}
}

I guess my question is this, is there a way to get llGetOwner() to listen to owner's objects. I know that Dialog, and link_message work, I have done them, this was just a new idea that I have been playing with...well...new for me.

Any advice or assistance would be very appreciated.
Resolver Bouchard
Registered User
Join date: 19 Jul 2006
Posts: 89
03-24-2007 16:26
The second script is filtering on chat from the owner, not objects owned by the owner.

You should accept chat from all keys and use llGetOwnerKey(id) in your listen to determine who owns the sender object.

It would also be a good idea to use a channel other than 0 for object-object communications.
Amanda Bedlam
Registered User
Join date: 15 Jan 2006
Posts: 2
Posting on 0
03-24-2007 17:32
Of course that was just for the demonstration, posting on 0 would cause too much spam as well as increase in lag.

I will try your other suggestion, thanks.