Jump to content

Toggled facial expression script ?


Enca Mode
 Share

You are about to reply to a thread that has been inactive for 3417 days.

Please take a moment to consider if this thread is worth bumping.

Recommended Posts

Hi all,

I'm trying to find a way to create a toggle on/off menu for a facial expression, but since I don't have any experience with creating menus in objects, all I can manage to do at this point is use a New Gesture and add default animations and wait times manually until I have the max number of allowed steps. Unfortunately this is still way too short of a duration, and I'd have to press the gesture's hotkey every 10-15 seconds to keep up the effect.

I've peeked into the scripting forums for help topics, but with everything looking so complex I don't even know where to begin, so....direct help here would be greatly appreciated. Thanks !

Link to comment
Share on other sites

I'm not quite clear about what you're trying to do, but it sounds like you want to make a version of a smiler attachment that fires several facial expressions at random intervals.  The internal animations are all at http://wiki.secondlife.com/wiki/Internal_Animations .  Look for the ones that start with express_ . They are all the ones that are in the graphic at the bottom of that page:
SL_face_expressions.jpg

When you write your script, grab all of the UUIDs for the textures you want to use from the table on that page and put them into a global list.  Write your attach event to request PERMISSION_TRIGGER_ANIMATION. Then all you need to do is start a timer event when the run_time_permissions event fires.  Use llStartAnimation to trigger a random animation from your global list of UUIDs each time it goes around.

 

Link to comment
Share on other sites

Yes, that part I can do.... with gestures you can add wait times of even half a second or whatever you like.  But my problem is that I only get to do that animation a certain number of times and then it stops and I have to push the hotkey again. I want the animation to *stay* on until I stop it.

Link to comment
Share on other sites

you need either an animation that is looped, or a timer loop?

the default anims are not looped,

here is an example of a timer loop for those...

 

integer k;default{    state_entry()    {  llRequestPermissions(llGetOwner(), PERMISSION_TRIGGER_ANIMATION);    }    touch_start(integer total_number)    { if(k = !k)         llSetTimerEvent(0.5);       else      llSetTimerEvent(0);       }    timer()    {  llStartAnimation("express_disdain");    }}

 

Link to comment
Share on other sites

Maybe the OP is not aware that facial expressions do not persist.

So the only way to achieve that is a loop.

You need a script that restarts the facial expression over and over again and to stop it the script will simply stop the restarts.

You cant do it with a gesture, you need to wear a scripted hud/attachment for that. The hud can receive commands from gestures though.

Link to comment
Share on other sites

You are about to reply to a thread that has been inactive for 3417 days.

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
 Share

×
×
  • Create New...