gooser Posted January 19, 2015 Posted January 19, 2015 I see there is a way to get thread_id from the new style animation events, but is there a way with the old style? Thanks
gooser Posted January 19, 2015 Author Posted January 19, 2015 Related: http://www.loverslab.com/topic/30405-sl-152-and-hooks-after-animation-end/ I understand this post, but I don't understand why the registration uses "_helpless" as the end of the event name... Was that a typo?
Ashal Posted January 19, 2015 Posted January 19, 2015 in the old style hooks argstring IS the thread_id. Event NewStyle(int thread_id, bool HasPlayer) sslThreadController Thread = SexLab.GetController(thread_id) Event OldStyle(String eventName, String argString, float argNum, Form Sender) sslThreadController Thread = SexLab.HookController(argString) ; // Exact same and basically just a shortcut to doing: sslThreadController Thread = SexLab.GetController(argString as int) The point of the new hook style is simply that they make more sense syntactically without all the needless and cryptic arguments of the old style. I understand this post, but I don't understand why the registration uses "_helpless" as the end of the event name... Was that a typo? Not a typo, it's a thread specific hook rather than a global one.Registering for "AnimationStart" will trigger your callback for ALL animations that start. If you start a thread and use Thread.AddHook("helpless") then in addition to sending the global "AnimationStart" event, it will ALSO send a thread specific event "AnimationStart_helpless" Or rather in the new style hooks, "HookAnimationStart" and "HookAnimationStart_helpless"
gooser Posted January 19, 2015 Author Posted January 19, 2015 in the old style hooks argstring IS the thread_id. Event NewStyle(int thread_id, bool HasPlayer) sslThreadController Thread = SexLab.GetController(thread_id) Event OldStyle(String eventName, String argString, float argNum, Form Sender) sslThreadController Thread = SexLab.HookController(argString) ; // Exact same and basically just a shortcut to doing: sslThreadController Thread = SexLab.GetController(argString as int) The point of the new hook style is simply that they make more sense syntactically without all the needless and cryptic arguments of the old style. I understand this post, but I don't understand why the registration uses "_helpless" as the end of the event name... Was that a typo? Not a typo, it's a thread specific hook rather than a global one. Registering for "AnimationStart" will trigger your callback for ALL animations that start. If you start a thread and use Thread.AddHook("helpless") then in addition to sending the global "AnimationStart" event, it will ALSO send a thread specific event "AnimationStart_helpless" Or rather in the new style hooks, "HookAnimationStart" and "HookAnimationStart_helpless" Oh, I see. Thanks!
Recommended Posts
Archived
This topic is now archived and is closed to further replies.