billypnats Posted August 7, 2024 Posted August 7, 2024 Noob modder here trying to create a scene in CK . Trying to make a goblin (riekling) corruption mod, the idea is to create a scene invovling goblin and PC. While the scene is running add in sexlab animation with dialogue. I learn by looking at other mods and I can't find one that can do this thanks
traison Posted August 7, 2024 Posted August 7, 2024 Seems like this has been covered before: https://www.loverslab.com/topic/163750-start-sex-through-dialog/ https://www.loverslab.com/topic/197402-sexlab-simple-dialog/
blank_v Posted August 7, 2024 Posted August 7, 2024 If I remember correctly there is SL function to start random Sex animation between actors, all You have to do is to then attach the script into Dialogue or scene stage. I'm no longer working with SL and I'm after like 2/3 years of break off modding but it's easily possible. Maybe describe more what You want to create? You can call Scripts directly from scene ( right click phase and add papyrus fragment ) and You can start SL via Script... Unless something changed in those 3 years, SL is playing scene all by itself. Or You can have more control of it via Dialogues ( and also papyrus fragment scripts )
traison Posted August 7, 2024 Posted August 7, 2024 6 minutes ago, ̖̪. said: If I remember correctly there is SL function to start random Sex animation between actors, all You have to do is to then attach the script into Dialogue or scene stage. ;/* StartSex * * This is an easy and quick function to start a Sexlab animation without requiring too much code. * * The difference between StartSex and QuickStart is that StartSex requires a list of animations (at least one), while QuickStart grabs the animations using animation Tags * * * * @param: Positions, is an array of Actors that will be used in the animation, up to 5 actors are supported. The very first is considered to be the "Passive Position". If actors are unspecified this function will fail. * * @param: Anims, is an array of sslBaseAnimation, and it is used to specify which animations will play. In case the animations are empty, not valid, or the number of the actors expected by the animation is not equal to the specified number of actors, then the animations are picked automatically by the default animation. (See GetAnimationsByDefault) * * @param: Victim [OPTIONAL], if this Actor specified, then the specified actor (that should be one of the list of actors) will be considered as a victim. * * @param: CenterOn [OPTIONAL], if the ObjectReference is specified, then the animation will be centered on the specified object. It can be a marker, a furniture, or any other possible ObjectReference. * * @param: AllowBed, it is a boolean, if the value is false, then the animations requiring a bed will be filtered out * * @param: Hook, you can specify a Hook for the animation, to register for the animation events (AnimationStart, AnimationEnd, OrgasmStart, etc.) See the Hooks section for further description * * * * @return: the tid of the thread that is allocated by the function, useable with GetController(). -1 if something went wrong and the animation will not start. */; int function StartSex(Actor[] Positions, sslBaseAnimation[] Anims, Actor Victim = none, ObjectReference CenterOn = none, bool AllowBed = true, string Hook = "") That is exported from SexLabFramework.psc. Thus you call it like so: SexLabFramework Property MySexLabReference Auto ... MySexLabReference.StartSex(...) 1
billypnats Posted August 8, 2024 Author Posted August 8, 2024 18 hours ago, traison said: Seems like this has been covered before: https://www.loverslab.com/topic/163750-start-sex-through-dialog/ https://www.loverslab.com/topic/197402-sexlab-simple-dialog/ Sorry I meant having it play in an actual scene, not while the dialogue interface is open. 18 hours ago, ̖̪. said: If I remember correctly there is SL function to start random Sex animation between actors, all You have to do is to then attach the script into Dialogue or scene stage. I'm no longer working with SL and I'm after like 2/3 years of break off modding but it's easily possible. Maybe describe more what You want to create? You can call Scripts directly from scene ( right click phase and add papyrus fragment ) and You can start SL via Script... Unless something changed in those 3 years, SL is playing scene all by itself. Or You can have more control of it via Dialogues ( and also papyrus fragment scripts ) The issue with attaching sexlab to scene script is really the dialogue timing part. how do I make it so that the PC or NPC will say the right thing while playing the correct animation?
traison Posted August 8, 2024 Posted August 8, 2024 44 minutes ago, billypnats said: how do I make it so that the PC or NPC will say the right thing while playing the correct animation? I imagine a combination of SL events... ;# AnimationStart - Sent when the animation starts # ;# AnimationEnding - Sent when the animation is going to end, but the thread is still doing some final tasks # ;# AnimationEnd - Sent when the animation is fully terminated # ;# LeadInStart - Sent when the animation starts and has a LeadIn # ;# LeadInEnd - Sent when a LeadIn animation ends # ;# StageStart - Sent for every Animation Stage that starts # ;# StageEnd - Sent for every Animation Stage that is completed # ;# OrgasmStart - Sent when an actor reaches the final stage # ;# OrgasmEnd - Sent when the final stage is completed # ;# AnimationChange - Sent if the Animation that was playing is changed by the HotKey # ;# PositionChange - Sent if the Positions of the animation (the involved actors) are changed # ;# ActorsRelocated - Sent if the actors gets a new alignment # ;# ActorChangeStart - Sent when the function ChangeActors is called # ;# ActorChangeEnd - Sent when the replacement of actors, by the function ChangeActors is completed ...and globalvariables or quest stages could be used to branch dialogue. Something like: SexLabFramework Property MySexLabReference Auto ;MyQuest Property MySceneQuest Auto ;GlobalVariable Property MySceneGv Auto ... RegisterForModEvent("HookStageStart", "SexLabStageStart") ... Event SexLabStageStart(int threadId, bool hasPlayer) sslThreadController thread = MySexLabReference.GetController(threadId) sslBaseAnimation anim = thread.Animation If (anim != none) If (thread.Stage == 0) ; Stage 1 ;MySceneGv.SetValue(1) ;MySceneQuest.SetStage(10) ElseIf (thread.Stage == 1) ; Stage 2 ;MySceneGv.SetValue(2) ;MySceneQuest.SetStage(20) ElseIf (thread.Stage >= anim.StageCount()) ; Orgasm ;MySceneGv.SetValue(20) ;MySceneQuest.SetStage(200) EndIf EndIf EndEvent Obviously code like that would hardcode the animation to have a specific number of stages. You'd have to make it smarter to adhere to animations with any number of stages.
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