vector sitoffset=<0.0, 0.0, 0.1>; // sit position offset (x = front back, y = left right, z = updown)You don't have to do this, but I put in a sit target function (llSitTarget) just so that I could sit on the object easier. I would probably recommend this though, I had a rough time getting my av to sit down on the prim without it ("no room to sit here, try somewhere else"). All you would have to do to change this script to make it do what you want is put all your functions where " llSay(0, "zomgz!!");" is right now, and to implement it into another script just copy and paste everything in the "changed" event.
default{
state_entry(){
llSitTarget(sitoffset, ZERO_ROTATION);
}
changed(integer change)
{
if (change & CHANGED_LINK)
{
if (llAvatarOnSitTarget() != NULL_KEY)
{
llSay(0, "zomgz!!");
}
}
}
}
Happy sitting!
0 comments:
Post a Comment