Jump to content

Noob mod author--How to detect the end of a Sexlab Scene?


Recommended Posts

Posted

I'm making a mod where I need the following to happen:

  1. Player talks with NPC.
  2. NPC rapes player.
  3. After the rape is over, NPC forcegreets player.

 

I'm not new to quest making, but my scripting skills are largely self-taught and I've never made a mod with Sexlab before. I've found some handy tutorials for starting a SexLab scene from a dialogue line, so I'm reasonably confident that I can go from step 1 to step 2 without too much trouble. Step 2 to step 3, though, is confounding me, and my Google-fu has failed.

 

I tried looking inside some existing mods, but each of them seems to do it differently and also the exact mechanisms are still eluding me. Prison Alternative, for example, embeds the Sexlab call inside a scene; "SexLab.StartSex()" is called at the start of one phase in that scene, and the phase has a completion condition of "pamaPA_Global_Rape_SexlabStatus != 0". But I don't how or where that variable gets changed.

 

Sexlab Defeat, on the other hand, uses a dizzying assortment of script functions and framework quests; I have found the quest (and associated script) that governs what happens after the player is assaulted, but I can't figure out when and how that quest gets started/called.

 

Any suggestions? Is there some tutorial or documentation that I've missed? Any other mods that I could check for examples?

Posted
16 minutes ago, lollllllllllnope said:

I'm making a mod where I need the following to happen:

  1. Player talks with NPC.
  2. NPC rapes player.
  3. After the rape is over, NPC forcegreets player.

 

I'm not new to quest making, but my scripting skills are largely self-taught and I've never made a mod with Sexlab before. I've found some handy tutorials for starting a SexLab scene from a dialogue line, so I'm reasonably confident that I can go from step 1 to step 2 without too much trouble. Step 2 to step 3, though, is confounding me, and my Google-fu has failed.

 

I tried looking inside some existing mods, but each of them seems to do it differently and also the exact mechanisms are still eluding me. Prison Alternative, for example, embeds the Sexlab call inside a scene; "SexLab.StartSex()" is called at the start of one phase in that scene, and the phase has a completion condition of "pamaPA_Global_Rape_SexlabStatus != 0". But I don't how or where that variable gets changed.

 

Sexlab Defeat, on the other hand, uses a dizzying assortment of script functions and framework quests; I have found the quest (and associated script) that governs what happens after the player is assaulted, but I can't figure out when and how that quest gets started/called.

 

Any suggestions? Is there some tutorial or documentation that I've missed? Any other mods that I could check for examples?

 

All the script examples are in the SexlabFramework.psc file.  You're looking for "hooks".

 

Earlier in script:

RegisterForModEvent("HookAnimationEnd", "AnimEndedDoSomething")

 

Later in script create an event to catch this modevent:

Event AnimEndedDoSomething(int tid, bool hasplayer)

     If hasplayer

            ; player was in the scene that just ended, do all your stuff here

     EndIf

EndEvent

Posted

Thank you for the suggestion! I'll definitely give it a shot when I get to that point. Getting the scene to play in the first place has proven much more difficult than I originally expected :sweat_smile:

 

Quick forum etiquette question: If I have a different but related problem I could use some help troubleshooting, should I post it in this thread or make a new post?

Posted
8 minutes ago, lollllllllllnope said:

Thank you for the suggestion! I'll definitely give it a shot when I get to that point. Getting the scene to play in the first place has proven much more difficult than I originally expected :sweat_smile:

 

Quick forum etiquette question: If I have a different but related problem I could use some help troubleshooting, should I post it in this thread or make a new post?

 

Re: etiquette, I'd make a new one just because different people may feel more qualified to answer it.

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