Jump to content
You are about to reply to a thread that has been inactive for 2791 days.

Please take a moment to consider if this thread is worth bumping.

Recommended Posts

Posted

Hello all,

I have the following script:

default
{
	on_rez(integer start_param)
	{
	llSay(-99,"Exists");
	llListen(-99, "", llGetOwner(), "");
	}

	listen(integer chan, string name, key id, string message)
	{
		if(message=="Exists" && llGetOwnerKey(id)==llGetOwner())
		{
		llDie();
		}
	}
}

The problem with this is that when I rez a second object (containing of course this script), the first (already rezzed) object doesn't listen. However, if I type in chat "/-99 Exists" ,  it does listen and removes the object.

I tried to include a state entry for setting the channel but didn't work too.

Am I missing something?

Posted

Oh, it does listen.

llListen(-99, "", llGetOwner(), "");

It listens on channel -99 to the owner. 
Who is the owner? Only your avatar. Your objects don't have your uuid so they are filtered out.

You want to have it listen to objects that are owned by you.
It's not possible to set that in the listen parameters, so you need to change that line to:

llListen(-99, "", "", "");

The other filter in the listen event you have already installed:

llGetOwnerKey(id)==llGetOwner()

that gives TRUE if the uuid is your avatar or one or your objects - so that will work fine.

All you need to do is change the llListen.

  • Like 3
Posted

or you can try ...

llListenHarder(-99, "", "", "");

llListenReallyReallyHard(-99, "", "", "");

 

::ducks::

  • Like 1
Posted
32 minutes ago, Xiija said:

or you can try ...

llListenHarder(-99, "", "", "");

llListenReallyReallyHard(-99, "", "", "");

 

::ducks::

If you are having to listen that hard, perhaps the object is too far away and you need to llShout()..

Posted
34 minutes ago, Love Zhaoying said:

If you are having to listen that hard, perhaps the object is too far away and you need to llShout()..

No, no, no..... the object needs to llShout (or llRegionSay or llRegionSayTo).   Xiija got it right.  You have to llListenHarder or
 

if (llVecDist(llGetPos(),vTarget) > 20.0)
{
    llMoveToTarget(vTarget,10.);
}

xD

  • Like 2
Posted (edited)

2244136934_d404cae3d1_o.jpg.b90a8fb86c0cab43ea079cf67f6602e3.jpg

The new function

llBigListen( integer channel, string name, key id, string message, float nDecibel, integer bHighVolume )

is the answer - you are able to listen to 5,000 sims and fine tune to within 0.15 cm of the source emitter.This will revolutionize SL communication, but remember to set the boolean .bHighVolume to TRUE to protect against overload of user.

Have a nice weekend xD

(And yes just for fun!)

 

Edited by Rachel1206
  • Like 2
Posted (edited)

The only potential problem I see is sending the message before listening for it. It would explain the chat command working while the llSay is ignored.

So rather than 

llSayblahblahblah

llListenblahblahblah

I'd go

llListenblahblahblah

llSayblahblahblah.

I mean theoretically, at least. I've never put the one before the other, so yeah...

Edited by Berksey
You are about to reply to a thread that has been inactive for 2791 days.

Please take a moment to consider if this thread is worth bumping.

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
×
×
  • Create New...