Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // Simplified poseball script by Kanashimi, ver 0.1
- // Enter name of the animation here
- string ANIMATION = "Invisible Man";
- // Enter position here
- vector vecSitOffset = <0,0,1.1>; // Must not be 0,0,0 to work
- vector vecSitRotation = <0,0,0>; // Not quarternions, converted from XYZ rot
- // End of configuration
- key avatar;
- default
- {
- state_entry()
- {
- // Rotation is converted from XYZ rotation instead of XYZS (Quarternion)
- llSitTarget(vecSitOffset,llEuler2Rot(vecSitRotation * DEG_TO_RAD));
- }
- changed(integer change)
- {
- if(change == CHANGED_LINK) {
- avatar = llAvatarOnSitTarget();
- if(avatar != NULL_KEY) {
- //llSetAlpha(1.0); // Uncomment to hide on sit
- llRequestPermissions(avatar,PERMISSION_TRIGGER_ANIMATION);
- // llStopAnimation("sit");
- // llStartAnimation(ANIMATION);
- }
- else {
- if (llGetPermissionsKey() != NULL_KEY) {
- llStopAnimation(ANIMATION);
- //llSetAlpha(0.0); // Uncomment to show on stand
- }
- }
- }
- }
- run_time_permissions(integer perm){
- if(perm & PERMISSION_TRIGGER_ANIMATION){
- list l = llGetAnimationList(avatar);
- integer max = llGetListLength(l);
- while(max--){
- llStopAnimation(llList2Key(l,max));
- }
- llStartAnimation(ANIMATION);
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement