Jump to content

[Scripting with Sexlab] How to wait for ModEvent "AnimationEnd"??


Nymra

Recommended Posts

Posted

This is the problem:

 

it seems Sexlab is messing up my "Enable/Disable Playercontrol Script". 
If Sexlab runs, Player controls are spooky (I can disable them all I want, WASD, JUmp and E always still work.

If there is no Sexlab Scene before that, the Disabling works perfectly.

 

So I wonder if I can somehow "wait" within my script for Sexlab to really beeing finished (hoping that this helps... -.-)

From what I read I understand I need this:

 

if Furniture

RegisterForModEvent("AnimationEnd",   "OnSexLabEnd")



game.DisablePlayerControls(1, 1, 0, 0, 0, 1, 1, 1, 1)                            
Game.SetPlayerAIDriven(true)

 

Now I wonder how I can pull it off that the script only continues when the mod event is... what it is excatly? I do not understand what and when this Registering will return anything (I guess true?)

So would this work?

 

if Furniture

RegisterForModEvent("AnimationEnd",   "OnSexLabEnd")

while !AnimationEnd			---> wait while false??
Utility.wait(1.0)
endwhile
---> continue if true??
game.DisablePlayerControls(1, 1, 0, 0, 0, 1, 1, 1, 1)                            
Game.SetPlayerAIDriven(true)

 

 

thx alot as always :(
and believe me I m only asking this here after 3 hours of trying to make my way on my own.

Posted

You need two functions.

 

function foo
    RegisterForModEvent("AnimationEnd",   "OnSexLabEnd")
    ; do stuff
    ; return from function when you need to wait
endfunction

event OnSexLabEnd
    ; now do the stuff you'd have done after the "while"
    game.disablePlayerControls(etc etc)
endevent

  

Posted
1 hour ago, DocClox said:

You need two functions.

 


function foo
    RegisterForModEvent("AnimationEnd",   "OnSexLabEnd")
    ; do stuff
    ; return from function when you need to wait
endfunction

event OnSexLabEnd
    ; now do the stuff you'd have done after the "while"
    game.disablePlayerControls(etc etc)
endevent

  

 

 

 

uuuh, ok thx alot!!!!

 

Meanwhile I found out, that ZAP Furnitures are incompatible with damned ZAP Collars and bondage items lol....
I HUNTED THIS FOR YEARS! and now I ruled out Sexlab and accidently found out its is.... this.... unexpected.... s***

 

ok thx all I go sleep now. 20 hours or so

Archived

This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...