Eryneth Posted October 22, 2020 Posted October 22, 2020 I'm trying to change up the way scent of sex starts with no transition. Can anyone explain to me what I'm doing wrong with it? I'm inserting this: Function SLHHActivate(Actor pTarget, Actor pTargetFriend = None) Keyword SLHHScriptEventBCKeyword = Game.GetFormFromFile(0x0233C6, "SexLabHorribleHarassment.esp") as Keyword SLHHScriptEventKeyword.SendStoryEvent(None, pTarget, pTargetFriend) EndFunction In as in here: Function startRapeFromScene(Scene s) int pos = ssx.searchScene(s, -1, none) if pos!=-1 SLHHActivate(ptarget) endIf EndFunction Function startMasturbationFromScene(Scene s) int pos = ssx.searchScene(s, -1, none) if pos!=-1 startMasturbation(pos) endIf EndFunction 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 I'm not sure how to call it as a function and I'm fairly new to papyrus, I'm getting the error "variable ptarget is undefined" and I cannot find any reference to ptarget in papyrus documents. Does anyone know what I'm doing wrong?
Eryneth Posted October 22, 2020 Author Posted October 22, 2020 This compiled but didn't 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. int ivalue1 = StorageUtil.GetIntValue(none, "RapeVar") If ivalue1 == 1 Keyword SLHHScriptEventKeyword = Game.GetFormFromFile(0x0000C510, "SexLabHorribleHarassment.esp") as Keyword SLHHScriptEventKeyword.SendStoryEvent(None, pTarget) EndIf endFunction I'm assuming the NPC wasn't a valid ptarget? Grasping at straws i guess.
Eryneth Posted October 23, 2020 Author Posted October 23, 2020 I've managed to get this working through the creation kit by replacing the script fragments with Keyword SLHHScriptEventKeyword = Game.GetFormFromFile(0x0000C510, "SexLabHorribleHarassment.esp") as Keyword SLHHScriptEventKeyword.SendStoryEvent(None, akSpeaker) This then triggered both SLHH and an animation so i had to modify ssxSceneManager.psc from and to the following From elseif sceneSexType==2 ; Rape (and the target will be the victim) startRape(pos) To elseif sceneSexType==2 ; Rape (and the target will be the victim) ssx.releaseScene(sc) cleanup() return This allows the mod to continue to function for all other nonrape scenes but all of the rape scenes now trigger the SLHH function. Edit: This change means that any rape scene will not work against NPCs unless a check is made and the original trigger used.
Recommended Posts
Archived
This topic is now archived and is closed to further replies.