SkoomaFart Posted April 2, 2024 Posted April 2, 2024 Hello, I've been trying to figure out how to advance to a quest stage after a sex animation in creation kit (This is for a quest mod that I am working on). I've tried looking through some scripts from other mods like SexLab Solution but the code is too advanced for me xd. I even tried searching online but I could not find the answer that I am looking for. So, please I need your help 😄 Btw, I just started modding a few months ago, so I am still learning the ropes.
traison Posted April 2, 2024 Posted April 2, 2024 Look up the summary for the StartSex method in SexLabFramework.psc: Quote * * @param: Hook, you can specify a Hook for the animation, to register for the animation events (AnimationStart, AnimationEnd, */; Note the bit about hooks. Search for "ABOUT HOOKS IN SEXLAB" for the rest. In your mod event handler, call SetStage on your quest to advance to another stage. 1
SkoomaFart Posted April 2, 2024 Author Posted April 2, 2024 1 hour ago, traison said: Look up the summary for the StartSex method in SexLabFramework.psc: Note the bit about hooks. Search for "ABOUT HOOKS IN SEXLAB" for the rest. In your mod event handler, call SetStage on your quest to advance to another stage. Okay, I did it but I'm not sure if this is correct. Spoiler Scriptname ADBFQuestS extends Quest Conditional SexLabFramework Property SexLab auto ReferenceAlias Property Barbas Auto Quest Property DA03 Auto Function test () sslThreadModel Thread = SexLab.NewThread() Thread.AddActor (Game.GetPlayer()) Thread.AddActor(Barbas.GetRef() as Actor) Thread.SetHook("Myhook") RegisterForModEvent("HookAnimationEnd_Myhook", "AnimationEnding") Thread.StartThread() EndFunction Event myAnimEndEventHandler(int tid, bool HasPlayer) sslThreadController Thread = SexLab.GetController(tid) Actor[] Positions = Thread.Positions ;[Game.GetPlayer(), Barbas.GetRef()] DA03.SetStage(154) EndEvent Also, how do I proceed from here? Like how do I activate this code since I am not that fully knowledgeable with this sort of stuff.
traison Posted April 2, 2024 Posted April 2, 2024 43 minutes ago, Camppp said: I'm not sure if this is correct The RegisterForModEvent call is wrong. Your event name is different than what is given here. 43 minutes ago, Camppp said: how do I activate this code Since this is a script that inherits from the Quest script, it should be attached to the quest itself. I'm sure there's YouTube videos for this.
SkoomaFart Posted April 2, 2024 Author Posted April 2, 2024 13 minutes ago, traison said: The RegisterForModEvent call is wrong. Your event name is different than what is given here. Oh, I didn't notice that, mb. Anyways, I changed the script and attached it to the quest like you said. Spoiler Scriptname DA03_ADBFScript extends Quest SexLabFramework Property SexLab auto ReferenceAlias Property Barbas Auto Quest Property DA03 Auto Function BarbasF (ObjectReference akSpeakerRef) Actor akSpeaker = akSpeakerRef as Actor sslThreadModel Thread = SexLab.NewThread() Thread.AddActor (Game.GetPlayer()) Thread.AddActor(Barbas.GetRef() as Actor) Thread.SetHook("Myhook") RegisterForModEvent("HookAnimationEnd_Myhook", "myAnimEndEventHandler") Thread.StartThread() EndFunction Event myAnimEndEventHandler(int tid, bool HasPlayer) sslThreadController Thread = SexLab.GetController(tid) Actor[] Positions = Thread.Positions ;[Game.GetPlayer(), Barbas.GetRef()] DA03.SetStage(154) EndEvent
traison Posted April 3, 2024 Posted April 3, 2024 Don't forget to set the properties (SexLab, Barbas and DA03) before running it for the first time.
SkoomaFart Posted April 3, 2024 Author Posted April 3, 2024 24 minutes ago, traison said: Don't forget to set the properties (SexLab, Barbas and DA03) before running it for the first time. Hmm. I tested it out but the script didn't activate for some reason. I also set the properties like you said. Spoiler Scriptname DA03_ADBFScript extends Quest Function BarbasF (ObjectReference akSpeakerRef) Actor akSpeaker = akSpeakerRef as Actor sslThreadModel Thread = SexLab.NewThread() Thread.AddActor (Game.GetPlayer()) Thread.AddActor(Barbas.GetRef() as Actor) Thread.SetHook("Myhook") RegisterForModEvent("HookAnimationEnd_Myhook", "myAnimEndEventHandler") Thread.StartThread() EndFunction Event myAnimEndEventHandler(int tid, bool HasPlayer) sslThreadController Thread = SexLab.GetController(tid) Actor[] Positions = Thread.Positions ;[Game.GetPlayer(), Barbas.GetRef()] DA03.SetStage(154) EndEvent SexLabFramework Property SexLab auto Quest Property DA03 Auto ReferenceAlias Property Barbas Auto Spoiler I think I did something wrong in this part. Because what I'm trying to do is that after talking to Clavicus you will automatically fuck Barbas after the dialogue. I tested ingame, but nothing happened. Spoiler
traison Posted April 3, 2024 Posted April 3, 2024 What does the Papyrus log have to say about that? If there's no hints in there, consider adding Debug.Notification calls around the place. Make sure for instance that akSpeakerRef is set in Function BarbasF; make sure Barbas.GetRef() as Actor actually returns an actor and so on. 1
SkoomaFart Posted April 3, 2024 Author Posted April 3, 2024 41 minutes ago, traison said: What does the Papyrus log have to say about that? If there's no hints in there, consider adding Debug.Notification calls around the place. Make sure for instance that akSpeakerRef is set in Function BarbasF; make sure Barbas.GetRef() as Actor actually returns an actor and so on. Okay, I don't know what I did but somehow it started working XD. Anyways, thank you for your help. I appreciate it very much
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now