littlepinkpie

Problem with listen

11 posts in this topic

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?

Share this post


Link to post
Share on other sites

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.

3 people like this

Share this post


Link to post
Share on other sites

or you can try ...

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

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

 

::ducks::

1 person likes this

Share this post


Link to post
Share on other sites
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()..

Share this post


Link to post
Share on other sites
4 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()..

Or llRegionSay().

Share this post


Link to post
Share on other sites
Just now, Madelaine McMasters said:

Or llRegionSay().

You don't llSay()!

1 person likes this

Share this post


Link to post
Share on other sites
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

2 people like this

Share this post


Link to post
Share on other sites
13 hours ago, Madelaine McMasters said:

Or llRegionSay().

Yes llregionsayto worked.

Thank you

Share this post


Link to post
Share on other sites

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
2 people like this

Share this post


Link to post
Share on other sites

Lol !  ... Now That is a Big Listen!

1 person likes this

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now