Jump to content

Creation Kit: advancing to a quest stage after sex animation ends.


Recommended Posts

Posted

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.

Posted

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.

Posted
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.

Posted
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.

Posted
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

 

image.png.611acf07ea5e19e9f4508d8d2eec339b.png

Posted
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

image.png.a4bde06a2251da2ce2912d02fbd2ee8f.png

 

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

Screenshot2024-04-03222334.png.02e5b300c2c79ac62ef663f2d229b5fd.png

 

Posted

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.

Posted
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 :D

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

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