Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

How does "hold_R_handgun" work?

Gene Replacement
.........................
Join date: 26 May 2006
Posts: 54
09-11-2006 20:18
I've been wondering if there's an easier way to recreate the hold_R_handgun animation. This animation, when triggered, appears to have two states. When out of mouselook, the avatar holds the object with the upper arm down and the lower arm forward, and in mouselook both arms extend forward and do an aiming pose.

Some sample code to see this:
CODE
default {
state_entry() {
llRequestPermissions(llGetOwner(), PERMISSION_TRIGGER_ANIMATION);
}
run_time_permissions(integer permissions) {
llStartAnimation("hold_R_handgun");
}
touch_start(integer a) {
llStopAnimation("hold_R_handgun");
}
}


This could easily be done by polling the avatar to see if it's in mouselook, however if it can be recreated through animations it would save on some lag/script space.
Archanox Underthorn
Registered User
Join date: 20 May 2003
Posts: 168
09-11-2006 22:53
Unfortunately that animation is special and pretty much the only way I can think of replicating it is how you described, polling the avatar for mouselook and then playing a second animation when it's found
_____________________
Archatek

Home to some of the highest quality katanas and other blades available in SL. Co-creator of the Samurai Island Combat System, one of the best melee combat systems available, come check it out!

___________________