Jump to content

Need help. Few dumb question about SexLab


Recommended Posts

Posted

1. In my mod im hooking Player Orgasm event. Mostly it works fine but sometimes this event not fires up. Why it can happens? I can using another evet to hook. For example OnAnimation end. But in this case how i can be sure that animation was not interrupted (for example by enemy attac)

 

2. Actor stripping. 

 

I need to prevent actor from stripping (or strip PC as i want but not SexLab) in case of my "custom" animation. For example its futa masturbating animation (im starting it via script after pressing some button), i have function to check if genitals are naked and if so then i dont need to run SexLab stripping function. But it runs anyway. I need this check only in my animations and for all others (Defeat events and etc) let it works how it was sei in Lab MCM.

for ses scene im using SexLab.StartSex function.

Posted
7 hours ago, TRX_Trixter said:

1. In my mod im hooking Player Orgasm event. Mostly it works fine but sometimes this event not fires up. Why it can happens? I can using another evet to hook. For example OnAnimation end. But in this case how i can be sure that animation was not interrupted (for example by enemy attac)

 

Not sure I entirely understand what you're asking here, but if separate orgasms are enabled or some other mod is messing with how orgasms are triggered in SexLab, then an actor won't always have an orgasm in the scene, so the event won't trigger.

 

I don't think being attacked interrupts animations unless one of the actors died as a result. But if you want to see if an actor is still in a scene or not, you can do 

if !SexLab.IsActorActive(ActorRef)
	;# ActorRef is not in a scene anymore, it either ended or was interuppted somehow.
endIf

 

 

Quote

2. Actor stripping. 

 

I need to prevent actor from stripping (or strip PC as i want but not SexLab) in case of my "custom" animation. For example its futa masturbating animation (im starting it via script after pressing some button), i have function to check if genitals are naked and if so then i dont need to run SexLab stripping function. But it runs anyway. I need this check only in my animations and for all others (Defeat events and etc) let it works how it was sei in Lab MCM.

 

for ses scene im using SexLab.StartSex function.

 

 

You can set custom strip settings using NewThread() instead of StartSex()

 

;# Open an animation thread to setup
sslThreadModel Thread = SexLab.NewThread()

;# Set the animations you want to play with an sslBaseAnimation[] array
Thread.SetAnimations(AnimationsList)

;# Set the actors in the scene
Thread.AddActor(ActorRef1)
Thread.AddActor(ActorRef2)

;# Create a 33 length bool array. Only the indexes set to TRUE will be stripped in scene
bool[] StripSlots = new bool[33]

;# index + 30 = biped slot
StripSlots[0]  = true ;# Biped slot 30 = head
StripSlots[3]  = true ;# Biped slot 33 = hands
StripSlots[7]  = true ;# Biped slot 37 = feet
StripSlots[32] = true ;# there is no biped slot 62, so the last index, 32, is used for weapons.

;# Tell the scene to override any other strip settings with our own for both actors.
Thread.SetStrip(ActorRef1, StripSlots)
Thread.SetStrip(ActorRef2, StripSlots)

;# Start the scene.
Thread.StartThread()

 

 

If you instead just want to disable sexlab's stripping entirely so you can handle it with your own methods or whatever reason, then instead of Thread.SetStrip(ActorRef, bool[]), just use Thread.SetNoStrip(ActorRef) to set an actor in the scene to skip stripping.

 

;# Open an animation thread to setup
sslThreadModel Thread = SexLab.NewThread()

;# Set the animations you want to play with an sslBaseAnimation[] array
Thread.SetAnimations(AnimationsList)

;# Set the actors in the scene
Thread.AddActor(ActorRef1)
Thread.AddActor(ActorRef2)

;# Tell the scene to not strip our two actors.
Thread.SetNoStrip(ActorRef1)
Thread.SetNoStrip(ActorRef2)

;# Start the scene.
Thread.StartThread()

 

Posted (edited)
1 hour ago, Ashal said:

 

Not sure I entirely understand what you're asking here, but if separate orgasms are enabled or some other mod is messing with how orgasms are triggered in SexLab, then an actor won't always have an orgasm in the scene, so the event won't trigger.

Hm.... Its a regular solo animation. Futanari masturbation. 

 

	string GenderTag = ""
	string AnimsTag = ""
	
	if Mastur_Type == 0
	   GenderTag = "M"
	   AnimsTag = "Solo"
	   Cum_WithPotions_Animation_Flag = true	
	elseif Mastur_Type == 1
	   GenderTag = "F"
	   AnimsTag = "Solo"
	   Cum_WithPotions_Animation_Flag = false
	endif
	
	Actor[] sexActors
	sexActors = new actor[1]	
	sexActors[0] = PlayerRef	
	sslBaseAnimation[] Manims 
    Manims = SexLab.GetAnimationsByTag(1,AnimsTag,GenderTag, requireAll=true)
	 
    game.enableplayercontrols()
    RegisterForModEvent("AnimationEnd_TRXMasturb", "MasturbationEndEvent")	
      
     SexLab.StartSex(sexActors, Manims, CenterOn = PlayerRef, AllowBed = false, Hook = "TRXMasturb")	

Nothing unusuall...  Separate orgasms disabled in SL but orgasm effects enabled.

Installed mods
1. SexLab

2. SLA
3. SOS
4. Defeat

 

Mostly it works fine:  animation starts, all stages, ending, strip and unstrip the actor. All works fine always except Orgasm event. One actor in safe place, no combat interruptions.

Is it possible that orgasm even can be canceled or blocked in some way by any active vanilla magic effect on PC? 

And thanks a lot for reply!  Information about actor stripping will be very useful for me. It is exactly what i'm looking for.

Edited by TRX_Trixter
Posted

AnimationEnd isn't the orgasm event, it's the event sent when a scene has ended fully.

 

What does your hooked MasturbationEndEvent event function look like?

Posted (edited)

On mod start (for any orgasm event in game)

 

RegisterForModEvent("PlayerTrack_Orgasm", "OnPlayerOrgasm")

 

then  

Event OnPlayerOrgasm(Form FormRef, int tid)



endevent

 

And additional hook for my masturbatiom procedure 

 

    RegisterForModEvent("AnimationEnd_TRXMasturb", "MasturbationEndEvent")	
      
    SexLab.StartSex(sexActors, Manims, CenterOn = PlayerRef, AllowBed = false, Hook = "TRXMasturb")	

 

 

function MasturbationEndEvent(string eventName, string argString, float argNum, form sender)
     ;debug.notification("Catch mastr event")
     UnregisterForModEvent("AnimationEnd_TRXMasturb")
     Masturbation_Post()
endfunction

 

Edited by TRX_Trixter

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