Jump to content

Seeking script method to check for active sex animations


Fredas

Recommended Posts

Posted

Posted this originally in the wrong forum, so to keep things succinct: Final touch on my mod is the detection of active sex animations (SexLab, Zaz, Estrus, seeking recommendations / reminders for what else).  Preferably without needing to tie my mod to anything besides Skyrim.esm.  Anyone who is familiar with the functions / methodology for achieving this, please do tell.  Thanks.

 

Posted

For sexlab you can just register for a mod callback event called AnimationStart, which is sent by SKSE anytime SexLab starts an animation. 

; // Somewhere in the same script
function WatchForSexLab()
       RegisterForModEvent("AnimationStart", "SexLabAnimationStarted")
endFunction

 ; // Callback event triggered whenever SexLab Starts an animation
event SexLabAnimationStarted(string eventName, string id, float argNum, form sender)
	; // Get the SexLab API without adding a master dependency
	SexLabFramework SexLab = (Quest.GetQuest("SexLabQuestFramework") as SexLabFramework)
	if SexLab != None
		; // Get the animation instance that started
		sslThreadController Thread = SexLab.HookController(id)

		; //  Do whatever checks you want to do with the available methods in the Thread script

	endIf
endFunction
Posted

 

For sexlab you can just register for a mod callback event called AnimationStart, which is sent by SKSE anytime SexLab starts an animation. 

 

Thanks.  I'll give that a whirl.  (Definitely would have taken a long time to figure all that out on my own.)

 

Would there possibly be a more passive method?  My mod is already set up so that it is constantly monitoring a certain variable, and not reliant on updates.  My idea is to basically use that loop to also check for whenever a sex animation (from any of the several mods which instigate them) is playing.  I made a note a while back of a function which I thought might point me in the right direction ("if anim.HasTag = "Estrus") but since I can't find any documentation on any part of that function, I'm guessing it was unique to whatever script I saw it in.

 

Of present concern is the fact that Estrus does not come packaged with script sources, so even if it provided the same convenient event flags as SexLab, I wouldn't know what to watch for.

 

Posted

An event callback is about 100000x more passive than constantly checking stuff with a loop.

 

Sure.  But sometimes the convenience is just not available. ;p  Anyway, that's not what I meant by "passive".  My goal is to tap into the activity of sex animations in a universal sense.  If Estrus etc. provide event flags like SexLab (which worked, btw - thanks), great.  That's not all my loop is monitoring, but it gets the job done.  With Estrus lacking script source, my hope is that there is some means of identifying the name of whatever animation the player happens to be using, and parse that name for "Estrus" or whatever's relevant.

Archived

This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...