battlesheep Posted July 28, 2017 Posted July 28, 2017 So i've been getting into modding skyrim, and i have been able to make some things using scripting that works. Right now i'm trying to figure out how to make a script that executes after the player is involved in a sexlab scene, and, for instance, prints a debug message that tells you the name of the other actor. I found the framework source code and it's been really helpful, and i understand that i need to use the tracking functions to do this, but i'm not really understanding how. So far, i've got: Scriptname sextracker extends ActiveMagicEffect Sexlabframework property SexLab Auto Actor Property PlayerRef Auto RegisterForModEvent("PlayerTrack_OrgasmEnd",SexTracker) Event Sextracker() Debug.Messagebox("you just fucked" + otheractor.getName()) EndEvent I don't even know how to identify the other actor, and the code for registering the event just won't compile. Thanks.
Guest Posted July 28, 2017 Posted July 28, 2017 There are a few problems with this script. 1) it is for a magic effect, and its code may be no more running when the animation ends. 2) The events of type "PlayerTrack_XXX" will require an event with this definition: Event myEvent(int threadID) Inside this event, you can try to use something like: Event Sextracker(int threadID) sslThreadController tc = SexLab.GetController(threadID) int i = tc.Positions.length while i i-=1 if tc.Positions[i] debug.messagebox("One actor was in the SexLab anim: " + tc.Positions[i].getDisplayName()) endIf endWhile endEvent
battlesheep Posted July 30, 2017 Author Posted July 30, 2017 Thanks for the response! I've figured out what's keeping it from compiling. From debug text, i can tell it's running this line: RegisterForModEvent("OrgasmEnd", "Sextracker") But for some reason, it's not executing "Sextracker" whenever "OrgasmEnd" occurs. I've made sure that the function is an event, too. EDIT: I figured it out. turns out you need to have the right arguments for whatever function you register. For this, i used Event Sextracker(string eventName, string argString, float argNum, form sender) and it finally worked
Recommended Posts
Archived
This topic is now archived and is closed to further replies.