Jump to content

Problem with listen


littlepinkpie
 Share

You are about to reply to a thread that has been inactive for 2559 days.

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

Recommended Posts

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?

Link to comment
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.

  • Like 3
Link to comment
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

  • Like 2
Link to comment
Share on other sites

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

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

You are about to reply to a thread that has been inactive for 2559 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
 Share

×
×
  • Create New...