Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

need help getting Listen to work

Miles Wobbit
Registered User
Join date: 8 Jun 2008
Posts: 1
06-13-2008 18:03
CODE

default
{
on_rez(integer start_param)
{
llOwnerSay("Hello");
state listenchat;
}
}
state listenchat
{
state_entry()
{
llListen(1, llGetOwner(),"","");
llOwnerSay("asdfadsf");
}
listen(integer channel, string name, key id, string message)
{
llOwnerSay("this works");
}
}


is there anything wrong with listen?? i get the llOwnerSay but the listen dosnt work
Viktoria Dovgal
Join date: 29 Jul 2007
Posts: 3,593
06-13-2008 18:14
From: Miles Wobbit

llListen(1, llGetOwner(),"","";);

is there anything wrong with listen?? i get the llOwnerSay but the listen dosnt work


There's a little mix up in the order there. llGetOwner returns a uuid, so you want

llListen(1, "", llGetOwner(),"";);

... and then it will respond to /1hello

You might want to add a state_entry in your default event that also does the state switching, on_rez doesn't fire if you only recompile or reset.
_____________________
Johan Laurasia
Fully Rezzed
Join date: 31 Oct 2006
Posts: 1,394
06-13-2008 19:36
yeah, the llGetOwner() was in the wrong spot, but why are you changing states?



http://www.secondscripter.com/
_____________________
My tutes
http://www.youtube.com/johanlaurasia