Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

Pose Scripts

LittleMe Jewell
...........
Join date: 8 Oct 2007
Posts: 11,319
01-01-2009 14:10
My pose stand, loaded with animations that I cycle thru, has the placement a bit too low. If I have on a full gown, some of the poses are so low, that the gown covers the arrow keys making it hard to click them to cycle to the next pose. The script is called 'turn180', which is the same script in all of my pose stands, though many of them have *slight* differences in them. Anyway, here is the text of the one in this posing stand -- what would I change to get me to do all posing a bit higher than current?

//Note: this code was adapted from someone.
//

key mkLoungingAgentKey = NULL_KEY;
integer miPermissionsAcquired = FALSE;

default
{
state_entry()
{
//overriden sit target
//lower them a bit
vector vLoungeTarget = <0.50, 0.00, 1.00>;

rotation rX;
rotation rY;
rotation rZ;
rotation r;

//build rotations
//Note: this is broken out like this to simplify the
// process of finding the correct sit angle. I
// use the following form until I have the rotation
// that I want perfect, and then I simply
// hardcode the perfected quaterion and remove
// this mess.
//
rX = llAxisAngle2Rot( <1,0,0>, 0 * DEG_TO_RAD); //cartwheel
rY = llAxisAngle2Rot( <0,1,0>, 0 * DEG_TO_RAD); //sumersault
rZ = llAxisAngle2Rot( <0,0,1>, 0 * DEG_TO_RAD); //turn in place

//combine rotations
r = rX * rY * rZ;

//override 'sit' on pie menu
llSetSitText( "Stand" );

//override default sit target and rotation on prim
llSitTarget( vLoungeTarget, r );
}

changed(integer change)
{
if (change & CHANGED_LINK)
{
key agent = llAvatarOnSitTarget();
if ( mkLoungingAgentKey == NULL_KEY && agent != NULL_KEY )
{

//changed user
//cache new user key and request their permissions
mkLoungingAgentKey = agent;
llRequestPermissions(mkLoungingAgentKey,PERMISSION_TRIGGER_ANIMATION);
}
else if ( mkLoungingAgentKey != NULL_KEY && agent == NULL_KEY)
{

//user is getting up
if ( miPermissionsAcquired )
{

//restore anims
llStopAnimation("turn_180";);

}

//reset the script to release permissions
llResetScript();
}
}
}

run_time_permissions(integer parm)
{
if(parm == PERMISSION_TRIGGER_ANIMATION)
{

//set permission flag
miPermissionsAcquired = TRUE;

//cancel the sit anim
llStopAnimation("sit";);

llStartAnimation("turn_180";);
}
}
}


Thanks.
_____________________
♥♥♥
-Lil

Why do you sit there looking like an envelope without any address on it?
~Mark Twain~

Optimism is denial, so face the facts and move on.
♥♥♥
Lil's Yard Sale / Inventory Cleanout: http://slurl.com/secondlife/Triggerfish/52/27/22
.
http://www.flickr.com/photos/littleme_jewell
Viktoria Dovgal
Join date: 29 Jul 2007
Posts: 3,593
01-01-2009 14:15
This line here:

vector vLoungeTarget = <0.50, 0.00, 1.00>;

The third number is the Z, or vertical position from the middle of the prim, used by llSitTarget to set your avatar's position. Try bumping it from 1.00 to, say, 1.5 or so?
LittleMe Jewell
...........
Join date: 8 Oct 2007
Posts: 11,319
01-01-2009 14:23
Thank you - I was pretty sure it was one of those numbers, but I get nervous messing with any script in SL, afraid of what I might end up with.

Though, I should know, from my old programming days, that all I really have to do is save a copy and I can always put it back - and hey, this is a virtual world, so what is the worst that could happen to me?
_____________________
♥♥♥
-Lil

Why do you sit there looking like an envelope without any address on it?
~Mark Twain~

Optimism is denial, so face the facts and move on.
♥♥♥
Lil's Yard Sale / Inventory Cleanout: http://slurl.com/secondlife/Triggerfish/52/27/22
.
http://www.flickr.com/photos/littleme_jewell
Viktoria Dovgal
Join date: 29 Jul 2007
Posts: 3,593
01-01-2009 14:36
Yeah, that pretty much covers it. LSL is pretty safe, if a script wasn't already some kind of weapon or griefy toy to begin with, it would be pretty hard to get into too much trouble by accident.
LittleMe Jewell
...........
Join date: 8 Oct 2007
Posts: 11,319
01-01-2009 14:44
Well, as luck would have it, that ended up not being the script that was controlling things - I kept changing numbers and nothing about the pose was changing. I finally went back to digging thru the individual prims and found the pose cycling script (missed it before because it is alphabetically in the middle of all the animations in the contents). However, with the above answer, I was at least able to figure out which variable and position I needed to modify in that script.
_____________________
♥♥♥
-Lil

Why do you sit there looking like an envelope without any address on it?
~Mark Twain~

Optimism is denial, so face the facts and move on.
♥♥♥
Lil's Yard Sale / Inventory Cleanout: http://slurl.com/secondlife/Triggerfish/52/27/22
.
http://www.flickr.com/photos/littleme_jewell