dkatryl Posted October 10, 2013 Posted October 10, 2013 With the newer features in SL Framework 1.2, creating a StartThread() style scene is a bit more robust and allows a greater degree of customization than simply doing a StartSex(), which is spiffy for modders that can make use of that freedom. However, Ashal is only one guy, and the .git site's documentation on the newer features hasn't quite caught up to everything else. Many pages are still in an empty state such as: http://git.loverslab.com/sexlab/wikis/function-sethook Unfortunately, while I was able to fuddle my way through recreating the StartSex() into a StartThread() style, it appears that my previously working post-sex hook no longer is working. I am sure I am just setting it up wrong, but with the .git's page not having any examples yet, I'm not sure how to proceed. Do any modders that have begun converting (or just plain started) over to 1.2 know how to properly setup a post-sex hook? In the previous method, I would do this: sslBaseAnimation[] anims = SexLab.GetAnimationsByType(2, aggressive=true) RegisterForModEvent("AnimationEnd_PostRape", "PostRape") SexLab.StartSex(activeActors, anims, victim = Victim, hook="PostRape") And it worked like a charm. With the newer process, I set things up like this: Model.AddActor(Victim) Model.AddActor(Player) Model.DisableLeadIn() Model.DisableUndressAnimation(Victim) sslBaseAnimation[] anims = SexLab.GetAnimationsByType(2, aggressive=true) Model.SetAnimations(anims) RegisterForModEvent("AnimationEnd_PostRape", "PostRape") string Hook = "PostRape" Model.SetHook(Hook) Model.StartThread() Everything works as expected, Victim doesn't display undress animation, correct animations are played, sex happens, yay! Everything except the post-sex hook. This is what I start the Event with for the hook that I had been using for months with the StartSex() command: event PostRape(string eventName, string argString, float argNum, form sender) sslThreadController thread = SexLab.HookController(argString) Actor Victim = thread.GetVictim() Actor Player = SexLab.PlayerRef *Bunch of general non-Sexlab related stuff here* UnregisterForModEvent("AnimationEnd_PostRape") endEvent So, not sure what/where I am messing up without an example, but any help would be appreciated!
dkatryl Posted October 13, 2013 Author Posted October 13, 2013 Okay, I figured out the issue last night. It wasn't so much that the Hook wasn't set up correctly, it was the fact that the Hook in question targets the "Victim" from the nonconsensual sex scene with the "Actor Victim = thread.GetVictim()" line, and the Victim is never properly defined. In StartSex(), you define the Victim by simply putting "victim = ActorName" in the function's parameters, but when manually setting up the Thread, it wasn't defined. I don't see how to set it up, but fortunately, I was able to work around it since I know the actor slot that will contain the victim that doesn't change in my particular scenario, so I could just work around it, and now the hook is playing properly. Edit: Ashal pointed out it was as simple as setting a "True" flag in the AddActor() function. And lo and behold, now it works.
Recommended Posts
Archived
This topic is now archived and is closed to further replies.