Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

change event not firing??

William Lopez
Registered User
Join date: 12 Dec 2006
Posts: 6
12-15-2006 15:19
Hi all,

I created the (canonical) Sit/UnSit script to teleport people. However, after the teleport the Avatar still sitting, and I have to click the Stand Up.

I never see any of the llSay texts. It's almost as the Changed event is not firing...

The prim the avatar sits on is a door mat.

Suggestions would be most appreciated.

Will


default
{
state_entry()
{
llSetSitText("Enter";);
vector target=<233, 22, 24>;
rotation my_rot=llGetRot();
llSitTarget((target - llGetPos()) / my_rot, ZERO_ROTATION / my_rot);
}

changed(integer change)
{
if (change & CHANGED_LINK)
{
key avKey = llAvatarOnSitTarget();
if (avKey != NULL_KEY)
{
llSleep(1);
llUnSit(avKey);
llSay(0,"Unsitting";);
}
else
{
llSay(0,"NULL_KEY";);
}
}
else
{
llSay(0, "No changed_link";);
}
}
}
Newgate Ludd
Out of Chesse Error
Join date: 8 Apr 2005
Posts: 2,103
12-20-2006 07:08
worked fine for me.