Jump to content

Recommended Posts

Hi,

 

I am currently making a mod. I already know how to start an animation with script. However I do not know how to register an orgasm event, get the specific actors involved and run a script on them. Does anyone know the code for this? The plan is to make a script that allows semen to be swallowed by a female on blowjob.
 

actor[] sexActors = new actor[2]
sexActors[0] = akSpeaker
sexActors[1] = Game.GetPlayer()
sslBaseAnimation[] anims
anims = SexLab.GetAnimationsByTag(2, "AnimationTag", tagSuppress="AnimationTag")
SexLab.StartSex(sexActors, anims)


SexLabFramework Property SexLab auto

 

Link to comment

use this to register for the event:

RegisterForModEvent("OrgasmStart", "OnSexLabOrgasm")


 

Then your function to handle the event (which must be a function in the script from which you register):
 

Event OnSexLabOrgasm(string hookName, string argString, float argNum, form sender)
    sslThreadController ssl_controller = SexLab.HookController(argString)

    if (ssl_controller == None)
        return
    endif
    <you can check the contents of ssl_controller.Positions here to see which actors are in the animation>
EndEvent




If/when you want to stop listening for the event:

UnregisterForModEvent("OrgasmStart")



Note that the above will run for any SexLab scene. If you want to only get the event for specific scenes, set the hook name on the scene's SexLabController and then register for "OrgasmStart_<whatever you called the hook>" instead of just "OrgasmStart". (The underscore is part of the name, but, of course, the braces are not.) In this case, though, you'll of course need to register/unregister for each scene. If you're starting the scene yourself, this is easy enough to do when you start the scene, then unregister in the OrgasmStart handler. Of course, you can always just get the event for every scene and have checks in your handler to just return for ones you don't care about. It shouldn't be firing often enough to affect performance.
 

Edited by GGx88A6HHnsL2
moved code into code blocks
Link to comment

Happy new year everyone!

 

Regarding the previous question. I looked at the argstring inside the sexlab framworks script. The autor himself said not to use argstring functions. Could you perhaps fill in the values. Like a script to register a blowjob event. Get the two actors and add a gold coin to the female actor when orgasm is reached? One that could be pasted into the creation kit script and works without editing. It is easier to reverse engineer for me than to fill the values in myself. I know some basic scripting from vanilla skyrim but the functions ssl uses are different. If you don't want to write a working script for me I would understand. If you do, thanks a lot ?

Edited by DarkBlade13
Link to comment

Well I personally never do scripting with the CK unless I'm setting up some very simple one-liners for a dialogue or stuff like that, so that entire part is on you. This should however for the most part cover what you requested (not tested):

; Properties
SexLabFramework Property SexLab Auto
ObjectReference Property Gold Auto ; Type may be wrong

; RegisterForModEvent("HookOrgasmStart", "SexLabOrgasmStart") ; This goes wherever you initialize your stuff.

; Events
Event SexLabOrgasmStart(int threadId, bool hasPlayer)
    sslThreadController thread = SexLab.GetController(threadId)
    sslBaseAnimation anim = thread.Animation
    
    If (!anim.HasTag("oral"))
        Return
    EndIf
    
    Actor[] actors = thread.Positions
    
    int i = 0
    While (i < actors.Length)
        If (SexLab.GetGender(actors[i]) == 1)
            actors[i].AddItem(Gold, 1)
        EndIf
        
        i += 1
    EndWhile
EndEvent

 

Edited by traison
Link to comment

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

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. For more information, see our Privacy Policy & Terms of Use