Jump to content

Help with script integration


Recommended Posts

 

I'm currently making a dialogue mod. I've already figured out how to run sexlab scenes, it's not a very difficult job with scripts. But I found a mod  https://www.loverslab.com/topic/102119-sexlab-horrible-harassment-expansion-lese/Such a piece of code is offered as integration, but when you add it to the dialogue in the quest, it does not work:

 

 

Function SLHHActivate(Actor pTarget, Actor pTargetFriend = None);  Basically you don't need pTargetFriend. pTarget will become a criminal,  who will try to rape you.
    Keyword SLHHScriptEventKeyword = Game.GetFormFromFile(0x0000C510, "SexLabHorribleHarassment.esp") as Keyword
    SLHHScriptEventKeyword.SendStoryEvent(None, pTarget, pTargetFriend)
endFunction

 

What should the script look like so that at the end of the dialogue the scene from slhh starts?

Link to comment

It's having issues because dialogue fragments can't define functions. The intended use of the snippet on the SLHH page would be to add it to a separate script somewhere and call it from your dialogue, to save some lines of code.

 

But you don't have to do it that way - you can directly put the body of that function into your fragment, e.g. only having this in the dialogue fragment:

 

 Keyword SLHHScriptEventKeyword = Game.GetFormFromFile(0x0000C510, "SexLabHorribleHarassment.esp") as Keyword
 SLHHScriptEventKeyword.SendStoryEvent(None, akSpeaker, None)

 

Note that in the second line, pTarget has been replaced with akSpeaker, and pTargetFriend with None. I'm unclear on what pTargetFriend does, so I'm only assuming it's unnecessary, as the page suggests.

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