Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

Problems with sit on target

Pietje Edelman
Registered User
Join date: 12 Jan 2007
Posts: 13
09-18-2007 08:16
What do I wrong? I think I oversee something. I have put this in a cube. I always get an empty key returned. Any tips?


default
{

changed(integer change)
{
llSay(0, "Changed entry";);

if (change & CHANGED_LINK)
{
llSay(0, "Avatar seat changed";);

key agent = llAvatarOnSitTarget();

if (agent)
{
llSay(0, "Seated";);
}

else
{
llSay(0, "Not seated";);
}
}
}

}
Talarus Luan
Ancient Archaean Dragon
Join date: 18 Mar 2006
Posts: 4,831
09-18-2007 08:26
For that function to work, you first have to have a sit target defined via llSitTarget, and the vector has to be something other than ZERO_VECTOR.
Pietje Edelman
Registered User
Join date: 12 Jan 2007
Posts: 13
09-18-2007 10:07
That did the job. Thanks Talarus Luan.