this script gets the current local position and rotation of the part it's in on touch. run it once for each position, then delete it. (only neds to be dropped in the parts that will change position)
default{
touch_start( integer vInt ){
llOwnerSay( (string)llGetLinkNumber() + ":" + (string)llGetLocalPos() + "," + (string)llGetLocalRot() );
}
}
drop this script in each part that you got information from, the order is pos,rot parked, then pos,rot ridden, obviously to replace the #'s
list gLstPosRot = [#,#,#,#];
uShift( integer vBooSit ){
llSetPrimitiveParams( [PRIM_POSITION, llList2Rot( gLstPosRot , (vBooSit * 2) ), PRIM_ROTATION, llList2Rot( gLstPosRot , (1 + vBooSit * 2) )] );
}
default{
state_entry(){
/*//-- really only a just in case the object goes back to inventory while ridden --//*/
uShift( 0 );
}
link_message( integer vInt, integer vIntSit, string vStrCmd, key vKey ){
if ("v7-D Shift Product Position" == vStrCmd){
uShift( vIntSit );
}
}
}
this is the script that controls it all when it's done... when the rider sits it'll shift the alignment to the front, when the rider gets up it'll shift the positions to parked. it doesn't matter what prim this is in.
default{
changed( integer vBitChg ){
if (CHANGED_LINK & vBitChg){
integer vBooSit = (integer)((string)llAvatarOnSitTarget());
llMessageLinked( LINK_SET, vBooSit, "v7-D Shift Product Position", "" );
}
}
}
I was nice and did the control script with a boolean so you could reuse it to set the tilt of the whole bike.
if the parts only rotate around their respective axis then you can change the second script to only set rotations and you won't need position information
ETA:
I haven't checked these script for compile, so if they have errors you'll need to do that part yourself