Lucius Obviate Posted September 1, 2011 Share Posted September 1, 2011 I sit possible within the bounds of SL to create an animation that will keep an avatars mouth open? I am creating a gag attachment and in order for it to look right the mouth would have to stay open as long as it is attached to the avatar. Link to comment Share on other sites More sharing options...
Robustus Hax Posted September 1, 2011 Share Posted September 1, 2011 All of the facial gestures in SL are built in, so you would make a script that calls the mouth open gesture (whichever one that is, i think a few of them do it) and you would probably need to have the animation triggered repeatedly on a loop so that the mouth wont close. I beleive the animation is express_open_mouth http://wiki.secondlife.com/wiki/Internal_Animations Link to comment Share on other sites More sharing options...
Innula Zenovka Posted September 1, 2011 Share Posted September 1, 2011 Try something like this: list gAnimations = ["express_open_mouth","express_repulsed_emote" ];restartAnimations(){ integer max = llGetListLength(gAnimations) ; string ani ; while (max--) { ani = llList2String(gAnimations, max) ; llStopAnimation(ani) ; llStartAnimation(ani) ; }}default{ attach(key attached) { if(attached){ llRequestPermissions(attached,[PERMISSION_TRIGGER_ANIMATION); } else{ llSetTimerEvent(0.0); } } run_time_permissions(integer permissions) { if(permissions & PERMISSION_TRIGGER_ANIMATION){ restartAnimations(); llSetTimerEvent(1.0); } } timer() { restartAnimations(); }} You can use as many of the facial expressions animations listed in http://wiki.secondlife.com/wiki/Internal_Animations as you like to build up gAnimations. Just remember to put each one in "double quotes", separated by commas, and no comma after the last one. Link to comment Share on other sites More sharing options...
Amaranthim Talon Posted September 12, 2011 Share Posted September 12, 2011 This is very handy and I have used it - on an attachment - I would love to find a way to make the script work when using a pose ball. I'm afraid I have zero scripting skills. Any help would be appreciated in this, tia. Does anyone here know what wd need to be done to make this facial expression be possible when used with a poseball script? I use the standard Nyteve (?) poseball script. Thank you much. And anyone using the MLP system can make use of this: http://wiki.secondlife.com/wiki/MLPV2_Reference_Manual#Animations_.28Facial.29 Link to comment Share on other sites More sharing options...
Innula Zenovka Posted September 12, 2011 Share Posted September 12, 2011 Try something like this, Amaranthim (and yes, you may take it to any grid you like :matte-motes-grin: string my_anim;string hovertext =""; //if you want any hovertext, put it here, inside the double quoteslist gAnimations = ["express_open_mouth","express_repulsed_emote" ];restartAnimations(){ integer max = llGetListLength(gAnimations) ; string ani ; while (max--) { ani = llList2String(gAnimations, max) ; llStopAnimation(ani) ; llStartAnimation(ani) ; }}default{ state_entry() { llSitTarget(<0.0,0.0,0.25>,ZERO_ROTATION); //change if necessary llSetText(hovertext,<1.0,1.0,1.0>,1.0); llSetAlpha(1.0,ALL_SIDES); my_anim = llGetInventoryName(INVENTORY_ANIMATION,0);//use whatever animation is in my inventory if(llGetInventoryType(my_anim)!=INVENTORY_ANIMATION){//sanity check my_anim = "sit"; } } changed(integer change) { if(change & CHANGED_LINK){ key av = llAvatarOnSitTarget(); if(av){//someone's sat on me llRequestPermissions(av,PERMISSION_TRIGGER_ANIMATION); } else{ llSetTimerEvent(0.0); llSetText(hovertext,<1.0,1.0,1.0>,1.0); llSetAlpha(1.0,ALL_SIDES); if(llGetPermissions()&PERMISSION_TRIGGER_ANIMATION){ av = llGetPermissionsKey(); if (llGetAgentSize(av)!=ZERO_VECTOR){//still on the sim list l = llGetAnimationList(av); integer max = llGetListLength(l); while(max--){ llStopAnimation(llList2Key(l,max)); } } } } } if (change & CHANGED_INVENTORY){ llResetScript(); } } run_time_permissions(integer permissions) { if(permissions & PERMISSION_TRIGGER_ANIMATION){ llSetAlpha(0.0,ALL_SIDES); llSetText("",<1.0,1.0,1.0>,0.0); llStopAnimation("sit"); llStartAnimation(my_anim); restartAnimations(); llSetTimerEvent(1.0); } } timer() { restartAnimations(); }} Link to comment Share on other sites More sharing options...
Amaranthim Talon Posted September 13, 2011 Share Posted September 13, 2011 /me hugs Innula tight Off to try it out and will let you know! My anims may be working their way back in here soon, by the way am having too much fun for just one grid :matte-motes-big-grin: Link to comment Share on other sites More sharing options...
Amaranthim Talon Posted September 13, 2011 Share Posted September 13, 2011 Yay!!! Success Link to comment Share on other sites More sharing options...
Recommended Posts
Please take a moment to consider if this thread is worth bumping.
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now