Jump to content

Help with script integration


Recommended Posts

Posted

 

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?

Posted

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.

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