tomm434 Posted October 10, 2015 Share Posted October 10, 2015 Hi! My goal is to make the idle named "CowerIdles" play a little bit shorter. (to emulate NPC putting on the helmet). Stopping animation in-game via script is not reliable at all. Can I do it without using Blender? (I can work in nifskope for instance). If so, can anyone please tell me how I do it? I remember wotking with with GetUP animation and if I just set another longevity - NPC stops doing animation but freezes in place for the original duration of anim. Link to comment Share on other sites More sharing options...
rickerhk Posted October 10, 2015 Share Posted October 10, 2015 There may be other ways, but the only way's I've found to snap an actor out of an animation (once the conditions for it are false) are: 1. Perform a moveto on the actor to an Xmarkerheading marker (not a regular xmarker). 2. Perform a setalert 1, then a setalert 0 I've used the setalert method with the cower idles and it works well. If they don't have a weapon equipped it may look better. Link to comment Share on other sites More sharing options...
Belthan Posted October 10, 2015 Share Posted October 10, 2015 To force any animation to stop at any time, I use a dialog topic called IdleInterrupter with a short speaker animation, a 0.1 second OGG and LIP file (other the player stands still for the game's default "missing voice file" time) and a single space in the response text (so nothing appears in the subtitles). Then any time I want to force a character to abort an animation I can use the following script. I've found it to be extremely reliable. refname.say idleinterrupterIf you want to truncate a specific animation file (for example, you want a create a new animation which is just the first 3 seconds of an existing 10 second animation), you can do it in NifSkope. 1) Scroll to the bottom of the file and find NiTextKeyExtraData. Depending on the animation, there might be anywhere from two for a simple animation to six or more for a looping animation. You'll only need two.2) Expand the second key, change the Time to however much of the animation you want to play (in this example, 3) and change the Value to "end".3) Change NumTextKeys to 2. If there were any keys after the second one, they will be deleted when you save the file. Note that this will remove any looping, sound synchronization or whatever else the keys higher than 2 used to do.4) Scroll back to the top of the file, click on NiControllerSequence, and change Stop Time to the same number that you used as the Time for the "end" key.5) Save as a new file (obviously don't save over the original).6) Create a new Idle Animation in GECK which uses the new KF file, and you can use it as a dialog animation or script it with PlayIlde, without having to write extra script to make it stop playing. Link to comment Share on other sites More sharing options...
rickerhk Posted October 10, 2015 Share Posted October 10, 2015 That's awesome, Belthan :) Link to comment Share on other sites More sharing options...
tomm434 Posted October 10, 2015 Author Share Posted October 10, 2015 (edited) Thanks for responding guys! rickerhk, first method will be noticeable I suppose. Second method doesn't work for me - I tried both variants (Not with CowerIdles - but with another loop idle). Am I doing something wrong? LunetteRef.SetAlert 1 LunetteRef.SetAlert 0 and if DoOnce == 0 let DoOnce :=1 LunetteRef.SetAlert 1 elseif DoOnce == 1 let DoOnce :=2 Lunetteref.setAlert 0 endif ; quest delay is 0.2Belthan,I downloaded Ergo sum and extracted those files - it works allright (with a very small delay) but it interrupts what NPC says at the moment . For me empthy topic is not universal solution =(. Also I tried changing anim and it works, thanks a lot! Edited October 10, 2015 by tomm434 Link to comment Share on other sites More sharing options...
rickerhk Posted October 10, 2015 Share Posted October 10, 2015 There needs to be a delay between the two setalert functions. Link to comment Share on other sites More sharing options...
tomm434 Posted October 10, 2015 Author Share Posted October 10, 2015 So it seems like 0.2 sec delay is not good enough which means that's probably be noticeable too(. Link to comment Share on other sites More sharing options...
Recommended Posts