Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

Script Listening to Itself

Denrael Leandros
90 Degrees From Everythin
Join date: 21 May 2005
Posts: 103
05-31-2007 11:10
I was testing a script where a command was being sent out to a group of non-linked prims. Since the command could originate from any prim, I wrote the script so that the actual texture change only occured off the listen command. It appears that the prim issuing the command does not hear things it says.

Does that sound right?
Senuka Harbinger
A-Life, one bit at a time
Join date: 24 Oct 2005
Posts: 491
05-31-2007 11:51
From: Denrael Leandros
I was testing a script where a command was being sent out to a group of non-linked prims. Since the command could originate from any prim, I wrote the script so that the actual texture change only occured off the listen command. It appears that the prim issuing the command does not hear things it says.

Does that sound right?


yes. objects cannot hear speech issued from themselves. as an alternative, try simultaneously broadcasting a message within the prim via link messages.
_____________________
My SLExchange shop

Typos are forgiven; desecrating the english language with reckless abandon and necrophilic acts is not.


The function is working perfectly fine. It's just not working the way you wanted it to work.
Meade Paravane
Hedgehog
Join date: 21 Nov 2006
Posts: 4,845
05-31-2007 11:55
It's to prevent feedback.. Consider what this script would do:
CODE

default
{
state_entry()
{
llListen (0, ...);
llSay (0, "started!");
}

listen (..., string message)
{
if (message != "yo")
{
llSay (0, "bogus message!");
}
}
}
_____________________
Tired of shouting clubs and lucky chairs? Vote for llParcelSay!!!
- Go here: http://jira.secondlife.com/browse/SVC-1224
- If you see "if you were logged in.." on the left, click it and log in
- Click the "Vote for it" link on the left
Denrael Leandros
90 Degrees From Everythin
Join date: 21 May 2005
Posts: 103
05-31-2007 13:27
I suspected that was the cause, and unfortunately linked messages won't work here. Not a big problem, I just issued the update at the same time I sent the message to all other prims.

Thanks for the confirmation.