Thursday, July 26, 2007

Sitting on a pillow....


Can be tremendously difficult for newbies.. :)
I wanted to sit down "a la japonese"....

Follow these instructions:

1. create a sphere .737,.923,.436 (or whatever fits you!), the only thing is that it should not be actually spheric. Apply a texture of your choice.

2. add the following script:


vector offset = <0,0,0.8>; // might to adjust z this depending on your original dimensions rotation rot = <0,0,0,0>;
default {
state_entry() {
llSitTarget(offset,rot);
llSetText("",<0,0,0>,0);
llSetSitText("");
}
changed(integer change) {
if (change & CHANGED_LINK) {
if (llAvatarOnSitTarget() != NULL_KEY) {
llRequestPermissions(llAvatarOnSitTarget(), PERMISSION_TRIGGER_ANIMATION);
llStopAnimation("sit");
llStartAnimation("sit_ground");
}
}
}
}



Et voilĂ  you have a working sitting pillow. :)

No comments: