FUTHARK Posted September 2, 2014 Share Posted September 2, 2014 Hi  I'm looking for a way to make the player and npcs change 'facial expressions/phonemes/modifiers' more than once on each stage during SL animations. Is that possible?I know i can "mfg save xxxx" a batch file, and then execute it with the "bat xxxx" command, but is it possible to make it happen automatically so that they change facial expressions more often ... like evey 5 seconds?  Perhaps adding several expressions in a batch file and then adding a "delay-command" (if such one exists?) in between each expression?  Or am I far out on this one?   It's amazing what you've accomplished so far with the framework and modding in general here on LL.  Keep cool guys n girls. Link to comment
Ashal Posted September 4, 2014 Share Posted September 4, 2014 Pressing the "Realign Actors" hotkey (defaults to the [ key), essentially tells the actors to restart the current stage over again, which apart from forcing actors to reposition at their expected coords will also force actors to re-evaluate what their current enjoyment level should be, which feeds into them also evaluating what their current expression phase should be. So if their enjoyment has progressed enough in that stage to use a new expression phase, pressing this hotkey will force them to use it without going to the next stage. Â In a more automatic sense, whenever an actor plays their moan sound effect, or every 3 seconds in the case of actors that have their moan disabled, they also re-evaluate their enjoyment and expression. So technically they already do change expressions during stages automatically; it's just a matter of them getting their enjoyment up high enough during that stage, which is calculated via their partners sex skills in relation to the current animation, how long the animation has been playing, and the stage progression of the animation. Link to comment
trepleen Posted September 5, 2014 Share Posted September 5, 2014 Yes, it's easy with the framework. http://git.loverslab.com/sexlab/framework/wikis/expression-functions  Here is the code I use to make both the npc and player open their mouth, wait 2 seconds then close it, along with a sultry expression.  So it goes like this:  OpenMouth() Wait 2 seconds CloseMouth() Repeat  I use the code in a kissing animation for an upcoming voiced, follower companion mod.  Here is the code, ask questions if need be:   event onupdate();if in kissing stage dot he followingif iskissing == 1;is mouth open or closedif iskissingmouthopened == 1;set this to open mouth next updateiskissingmouthopened = 0;function that handles opening the mouthopenit()else;set this to close mouth on next updateiskissingmouthopened = 1;function that handles closing the mouthcloseit()endif;we'll keep doing the above events every 1.8 seconds until the kissing scene is stopped, iskissing gets set to 0 during the animation end sequenceregisterforsingleupdate(2.0)endif;do we do one last clearmfg?if queueclearmfg == 1;turn it offqueueclearmfg = 0;clear mfgs for player and katreenasexlab.clearmfg(game.getplayer())sexlab.clearmfg(kd_katreenadarkmoore) ;sets their expressions back to default or else they will have weird facial expressionendifendeventfunction openit()int[] facialsettinsg1 = new int[31]  ;mouth open plus sultry lookfacialsettinsg1[0] = 0facialsettinsg1[1] = 0facialsettinsg1[2] = 0facialsettinsg1[3] = 0facialsettinsg1[4] = 0facialsettinsg1[5] = 0facialsettinsg1[6] = 0facialsettinsg1[7] = 0facialsettinsg1[8] = 0facialsettinsg1[9] = 0facialsettinsg1[10] = 0facialsettinsg1[11] = 0facialsettinsg1[12] = 100facialsettinsg1[13] = 0facialsettinsg1[14] = 0facialsettinsg1[15] = 0facialsettinsg1[16] = 0facialsettinsg1[17] = 0facialsettinsg1[18] = 0facialsettinsg1[19] = 0facialsettinsg1[20] = 0facialsettinsg1[21] = 0facialsettinsg1[22] = 35facialsettinsg1[23] = 35facialsettinsg1[24] = 0facialsettinsg1[25] = 0facialsettinsg1[26] = 0facialsettinsg1[27] = 0facialsettinsg1[28] = 25facialsettinsg1[29] = 25facialsettinsg1[30] = 0facialsettinsg1[31] = 7facialsettinsg1[32] = 100sexlab.clearmfg(game.getplayer())sexlab.clearmfg(kd_katreenadarkmoore)sexlab.applypreset(game.getplayer(), facialsettinsg1)sexlab.applypreset(kd_katreenadarkmoore, facialsettinsg1)endfunctionfunction closeit()  ;mouth close plus sultry lookint[] facialsettinsg1 = new int[31]facialsettinsg1[0] = 0facialsettinsg1[1] = 0facialsettinsg1[2] = 0facialsettinsg1[3] = 0facialsettinsg1[4] = 0facialsettinsg1[5] = 0facialsettinsg1[6] = 0facialsettinsg1[7] = 0facialsettinsg1[8] = 0facialsettinsg1[9] = 0facialsettinsg1[10] = 0facialsettinsg1[11] = 0facialsettinsg1[12] = 0facialsettinsg1[13] = 0facialsettinsg1[14] = 0facialsettinsg1[15] = 0facialsettinsg1[16] = 0facialsettinsg1[17] = 0facialsettinsg1[18] = 0facialsettinsg1[19] = 0facialsettinsg1[20] = 0facialsettinsg1[21] = 0facialsettinsg1[22] = 35facialsettinsg1[23] = 35facialsettinsg1[24] = 0facialsettinsg1[25] = 0facialsettinsg1[26] = 0facialsettinsg1[27] = 0facialsettinsg1[28] = 25facialsettinsg1[29] = 25facialsettinsg1[30] = 0facialsettinsg1[31] = 7facialsettinsg1[32] = 100sexlab.clearmfg(game.getplayer())sexlab.clearmfg(kd_katreenadarkmoore)sexlab.applypreset(game.getplayer(), facialsettinsg1)sexlab.applypreset(kd_katreenadarkmoore, facialsettinsg1)endfunction   If you improve on this code please share it so I can adapt it to my own. Link to comment
Recommended Posts
Archived
This topic is now archived and is closed to further replies.