PeterMartyr Posted June 3 Share Posted June 3 it not an event as well, register for single update and check for it))) Link to comment Share on other sites More sharing options...
xkkmEl Posted June 22 Author Share Posted June 22 The more I test, the more confused I get; at this point I can no longer tell if am I confused or not . I am using IdlePray on an NPC: registerForAnimationEvent( target, "IdleStop"); I immediately get an event Debug.sendAnimationEvent( target, "IdlePray"); arms start lifting, and stay up wait some time Debug.sendAnimationEvent( target, "IdleStop"); arms start dropping, and I get an IdleStop event unregisterForAnimationEvent( target, "IdleStop") ... so that looks good, except I don't understand why I get an IdleStop event from the getgo. I my previous tests, I was using debug.notification to trace events; I think that sometimes debug.notification does not preserve well the order of the messages, making it look like the IdleStop happened after sending IdlePray. I am now using a tracing method that preserves the order better, and the IdleStop seems to always happen between the registerForAnimationEvent and sendAnimationEvent (which are two consecutive lines of code; the IdleStop event must be picked up by a 2nd CPU thread in order two run between these two lines of papyrus). If I send IdleForceDefaultState instead of IdleStop, the arms drop abruptly; otherwise no change. Through out this sequence, bIsInMT is True, and remains true (before, during and after). I also tried monitoring the bool variable bIdlePlaying; it remains false (before, during and after). The sgv console command, strangely, gives no output, as if the variables bIsInMT and bIdlePlaying don't exist. If I try with IdleCiceroDance1 instead of IdlePray, I get a similar sequence, except there is a false start: registerForAnimationEvent( target, "IdleStop"); I immediately get an event Debug.sendAnimationEvent( target, "IdleCiceroDance1"); dancing starts, but stops immediately and I receive a 2nd IdleStop event wait for the 2nd IdleStop event Debug.sendAnimationEvent( target, "IdleCiceroDance1"); dancing resumes, and keeps going wait some time Debug.sendAnimationEvent( target, "IdleStop"); dancing stops, and I get an IdleStop event unregisterForAnimationEvent( target, "IdleStop") So perhaps the IdlePray/IdleStop events work and my confusion is only the result of using debug.notification to trace... I am trying to generalize this for other idles, and to chain idles one after the other, and to deal with idles that are aborted when another NPC bumps into the idler. I'll update if I learn anything new. @PeterMartyr, looks like your information does not apply to NPCs, or at least to my use case... Link to comment Share on other sites More sharing options...
PeterMartyr Posted June 23 Share Posted June 23 (edited) @xkkmEl I give you a hint, when you check the the animation graph the game needs to be in certain state, else yeah bools and int give no output.. so checking it in the console will always be null, every single time try this if you want to continue having fun install an new ide or animation, loop or single matters not hack skyrim with FNIS or Nemesis using only the animation graph and only an onInit Event AND one line of debug code output to your choice trace, custom trace, console, box or notification. matters not Is it installed correctly, without using any Debug: Animation or Play Idle Code Just the animation graph.... BTW it worked fine with NPC for me, I was also using an idle array data structure and play idle, with what played being random so it was a tiny little bit more challenging than DEBUG code that is HARDCODED but that a great place to start if your new to this The animation graph works if you use it correctly EDIT correlation does not imply causation, has I am sure you are aware.. Edited June 23 by PeterMartyr Link to comment Share on other sites More sharing options...
xkkmEl Posted August 19 Author Share Posted August 19 So, here's my new solution. It looks like it's working, but then one can never be sure... I created custom copies of the idles I am interested in. It's the same hkx files, under a new name (to guard against replacer mods), but I use FNIS to create new start events and to make them send out a "qvDhIdleBegun" event when it does start. b -h,TqvDhIdleBegun/0.0 qvDhIdlePray qvDhIdlePray.hkx b -a,h,TqvDhIdleBegun/0.0 qvDhIdleApplaud4 qvDhIdleApplaud4.hkx To play an idle, I send "qvDhIdlePray" and wait to hear "qvDhIdleBegun". I'll repeat "qvDhIdlePray" every tenth of a second until I hear the confirmation that it started. Once it is started, I wait for "IdleStop" to know when it's done. If I want to stop the idle early, I send out "IdleForceDefaultState" and wait to hear "IdleStop". I'll repeat "IdleForceDefaultState" every tenth of a second until I do hear "IdleStop". Once it's stopped, it's ready for more idles. I can then chain them up however I like. Oh, another detail... I register for the two events I'm listening for as early as I can, but there are still cases where somehow the registration gets lost. I re-register for those events every time I send out the start or end events; dunno what that's about, the CK wiki makes no mention of lost animation event registrations. Using "IdleForceDefaultState" to abort an Idle makes for an abrupt end... not an issue if the actor immediately starts moving, or performing another idle... but It is suboptimal in the cases where he stays put seeing as the abruptness is then quite noticeable. Link to comment Share on other sites More sharing options...
Recommended Posts