fishburger67 Posted October 22, 2014 Share Posted October 22, 2014 I would like to avoid running scripts if there is a SexLab animation going on anywhere with any actor/actors. If there a sexlab function call to determine this?  I have looked in the framework and found nothing.  I know I can scan for the animating faction, but would like to avoid any scripting other than the function call to get a variable or something. Link to comment
Min Posted October 22, 2014 Share Posted October 22, 2014 Yup. Function MyMaintenanceFunction() RegisterForModEvent("HookAnimationStart", "OnAnimationStart") EndFunction ... Event OnAnimationStart(int threadID, bool HasPlayer) Â Â ; A Sexlab Animation has started: Do stuff. EndEvent Was this for Sexlab Aroused: Redux? Link to comment
Ashal Posted October 23, 2014 Share Posted October 23, 2014 If what you want is a specific function within SexLab that tells you a simple yes/no if there is any animations going on. Then no, there isn't.  It should be relatively easy to check however. bool function IsSexLabActive() int i = SexLab.Threads.Length while i i -= 1 if SexLab.Threads[i].IsLocked return true ; // There is a locked/active thread. endIf endwhile return false ; // No threads where locked/active endfunction Link to comment
Ashal Posted October 23, 2014 Share Posted October 23, 2014 Well since I just wrote it, I've gone ahead and added a bool SexLab.IsRunning property to the current development version of SexLab. Link to comment
fishburger67 Posted October 23, 2014 Author Share Posted October 23, 2014 Thanks all folks and yes it is for redux. I'll use Ashal's code for now as it was simpler than what I had planned. I don't want any heavy scripts running while there is an animation going on in an attempt to reduce script related CTDs.  Yup. Function MyMaintenanceFunction() RegisterForModEvent("HookAnimationStart", "OnAnimationStart") EndFunction ... Event OnAnimationStart(int threadID, bool HasPlayer)   ; A Sexlab Animation has started: Do stuff. EndEvent Was this for Sexlab Aroused: Redux?   Well since I just wrote it, I've gone ahead and added a bool SexLab.IsRunning property to the current development version of SexLab.    If what you want is a specific function within SexLab that tells you a simple yes/no if there is any animations going on. Then no, there isn't.  It should be relatively easy to check however. bool function IsSexLabActive() int i = SexLab.Threads.Length while i i -= 1 if SexLab.Threads[i].IsLocked return true ; // There is a locked/active thread. endIf endwhile return false ; // No threads where locked/active endfunction Thanks to everyone and yes it is for Redux. I don't want any script heavy stuff going on while there is an animation in progress in an attempt to reduce the script related CTDs. Link to comment
Recommended Posts
Archived
This topic is now archived and is closed to further replies.