Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

Micro-Phoney

Marianne McCann
Feted Inner Child
Join date: 23 Feb 2006
Posts: 7,145
01-07-2008 17:27
I've tried my hand at a simple script for a mircophone, and it seems to work okay -- as long as it is in my hands. I can't see to get it to work for anyone else, however. If I give them a copy, it simple does not work.

Here's the code

CODE

default
{
state_entry()
{
llListen(17,"",llGetOwner(),"");
}
listen( integer chan, string name, key id, string msg)
{
llSetObjectName( name );
llShout( 0, msg );
}
on_rez(integer start_param) {
llResetScript();
}
}


Any ideas? I'm sure I'm doing something wrong.
_____________________


"There's nothing objectionable nor illegal in having a child-like avatar in itself and we must assume innocence until proof of the contrary." - Lewis PR Linden
"If you find children offensive, you're gonna have trouble in this world :)" - Prospero Linden
Anti Antonelli
Deranged Toymaker
Join date: 25 Apr 2006
Posts: 1,091
01-07-2008 17:52
Once it starts listening to you, as owner, it never stops even when you give it to someone else. If you want it to start listening to the new owner when they use it, you should add an on_rez event and llResetScript there.
_____________________
Designer of sensual, tasteful couple's animations - for residents who take their leisure time seriously. ;)

http://slurl.com/secondlife/Brownlee/203/110/109/

Alicia Sautereau
if (!social) hide;
Join date: 20 Feb 2007
Posts: 3,125
01-07-2008 17:53
just tested with an alt and works fine :)

integer channel = 17;

default
{
on_rez(integer start_param)
{
llResetScript();

}

state_entry()
{
llSetObjectName(llKey2Name(llGetOwner()));
llListen(channel,"",llGetOwner(),"";);
}

listen( integer channel, string name, key id, string msg)
{
llShout( 0, msg);
}
}
_____________________
Marianne McCann
Feted Inner Child
Join date: 23 Feb 2006
Posts: 7,145
01-07-2008 20:54
Oh yay! That did it! Thanks!
_____________________


"There's nothing objectionable nor illegal in having a child-like avatar in itself and we must assume innocence until proof of the contrary." - Lewis PR Linden
"If you find children offensive, you're gonna have trouble in this world :)" - Prospero Linden