Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

Sleep Pose Script

neohiei Malick
Registered User
Join date: 20 Jan 2007
Posts: 5
01-11-2008 01:15
Hi everyone, Thanks all for your works!
Well, I'm making a bed, and I wanted to put a pose into a pillow...
I'm done with that, but my avi is not in a good position!
Some have a nice script that I can rotate my pose, so It will be in the wanted position?
or maybe just a tips ! I do use this one >>>

CODE
string ani_name = "SleepM"; // Put name of animation here
key sitter;

default
{
state_entry()
{
llSetSitText("Sleep");
llSetAlpha(1.0,ALL_SIDES);
llSitTarget(<0.5,0.6,0>,llGetRot());
}

changed(integer thechange) {
if (thechange & CHANGED_LINK) {
key now = llAvatarOnSitTarget();
if (now != NULL_KEY) {
llRequestPermissions(llAvatarOnSitTarget(),PERMISSION_TRIGGER_ANIMATION);
sitter = now;
} else {
llStopAnimation(ani_name); // Remove if this causes error in some SL vers
llSay(-8888,((string)sitter)+"booton");
llSetAlpha(1.0,ALL_SIDES);
}
}
}

run_time_permissions(integer perms) {
if (perms & PERMISSION_TRIGGER_ANIMATION) {
llSetAlpha(1.0,ALL_SIDES);
llSay(-8888,((string)sitter)+"bootoff"); // Lockmeister AO disable signal
llSleep(0.3); // Wait for AO to detect state and start its animation
list n = llGetAnimationList(sitter); // Stop all animations on avatar
integer t;
for (t=0; t<llGetListLength(n); t++) llStopAnimation(llList2Key(n,t));
llStartAnimation(ani_name); // Run our own animation
}
}

}


Thanks for advance :)
Squirrel Wood
Nuteater. Beware!
Join date: 14 Jun 2006
Posts: 471
01-11-2008 01:58
you will want to modify the sit target
neohiei Malick
Registered User
Join date: 20 Jan 2007
Posts: 5
01-11-2008 02:41
yup!
But if someone have a nice sleep script that I can use in a Pillow...
With script actually used, my avi goes out of the bed... and it's very hard to move and rotate, so If someone haves one! I'm interested :p
Void Singer
Int vSelf = Sing(void);
Join date: 24 Sep 2005
Posts: 6,973
01-11-2008 19:19
the trick I've seen for getting the position you want for setting sit target is to sit, open edit, select edit linked parts, move the bed into position, and then have it report the av's position and rotation (relative to the root) and then insert those in your sittarget call... Jesse Barnett wrote a script for this somewhere on this forum.
_____________________
|
| . "Cat-Like Typing Detected"
| . This post may contain errors in logic, spelling, and
| . grammar known to the SL populace to cause confusion
|
| - Please Use PHP tags when posting scripts/code, Thanks.
| - Can't See PHP or URL Tags Correctly? Check Out This Link...
| -