Jump to content

My hook to sexlab modevent works... but should it?


Recommended Posts

Posted

Hey!

Quick piece of advice -

My function called from the sexlab (164c) end anim mod event (self.RegisterForModEvent("AnimationEnd", "GetCreature")) looks like this:

 

Function GetCreature(String eventName, String argString, Float argNum, form sender)
    sslthreadcontroller controller = SexLab.HookController(argString)
    sslbaseanimation SLAnim = SexLab.HookAnimation(argString)
    Actor[] actorList = controller.Positions

 

and it works fine!

 

But I'm kind of aware that this is deprecated and I should be using this:

 

Function GetCreature(int tid, bool HasPlayer)
    sslthreadcontroller controller = SexLab.GetController(tid)
    sslbaseanimation SLAnim = controller.animation
    Actor[] actorList = controller.Positions

 

 

But it doesn't work...

I'm actually farther along than this, but always wondered exactly why this still works... Appreciate thoughts

Posted

For the newer version to work, you need to RegisterForModEvent("HookAnimationEnd", "GetCreature") 

 

You need to add "Hook" to the start of the event name for it to catch the newer hook events.

Posted

Well that's embarrassingly simple. Thank you.

Is there much benefit to using the newer version?

Archived

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

  • Recently Browsing   0 members

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