blackburnrus 31 Posted March 18, 2018 Some animations are very long, and I want to use only final 2seconds from 30sec animation. Is there any way to cut animation to the last to seconds? Or there is only way to use setAnimSpeedCoef with right hight coef and preparations, and manualy rewind it and then set default coef to that segment, that I need ? Share this post Link to post Share on other sites
johnnyboy 3743 Posted March 18, 2018 I'm guessing not. But if its for a cutscene, you could make a twin of the unit off camera (same face, uniform, etc.), and start the animation on the twin. Then wait X seconds until animation is at point you want, and setpos camera unit away, and replace him with the unit that is playing the animation. Of course the transition from first unit to second unit will be abrupt. But if you have multiple things happening in your scene you can cut away to some other camera target while you replace the unit with the animation unit, then cut back. 1 Share this post Link to post Share on other sites
pierremgi 4739 Posted March 19, 2018 anyUnit switchMove "" cuts the animation but you need to broadcast (remoteExec) it in MP. Share this post Link to post Share on other sites
AZCoder 921 Posted March 19, 2018 10 hours ago, pierremgi said: anyUnit switchMove "" cuts the animation but you need to broadcast (remoteExec) it in MP. The OP just wants the last 2 secs of a long animation. I don't think there's any way to do that short of modifying the animation file itself and repacking it into your own animation config. I think @Kydoimos had an animation tutorial on his website, but that site seems to be down now. Share this post Link to post Share on other sites
pierremgi 4739 Posted March 19, 2018 30 minutes ago, AZCoder said: The OP just wants the last 2 secs of a long animation. I don't think there's any way to do that short of modifying the animation file itself and repacking it into your own animation config. I think @Kydoimos had an animation tutorial on his website, but that site seems to be down now. As you want. I just used with success this code to stop any healing animation and give hand to attacked player instead of be killed during healing. Share this post Link to post Share on other sites
AZCoder 921 Posted March 19, 2018 1 hour ago, pierremgi said: As you want. I just used with success this code to stop any healing animation and give hand to attacked player instead of be killed during healing. You can interrupt an animation, I do this as well, but can you play only the last 2 secs of the animation? So if it's a 10 sec animation, you start it at 8 secs? Share this post Link to post Share on other sites
pierremgi 4739 Posted March 19, 2018 hmm, sorry, I didn't find any variable for the elapsed time in animation. Share this post Link to post Share on other sites
blackburnrus 31 Posted March 21, 2018 On 19.03.2018 at 1:51 AM, johnnyboy said: I'm guessing not. But if its for a cutscene, you could make a twin of the unit off camera (same face, uniform, etc.), and start the animation on the twin. Then wait X seconds until animation is at point you want, and setpos camera unit away, and replace him with the unit that is playing the animation. Of course the transition from first unit to second unit will be abrupt. But if you have multiple things happening in your scene you can cut away to some other camera target while you replace the unit with the animation unit, then cut back. Hm. If I making SP mission, and every player who will play it has his own face. I dont want set one face for everyone. How can I import face of the player, when mission starts and export it to AI-understudy? -- oh god, there is face command 1 Share this post Link to post Share on other sites
HazJ 1288 Posted March 21, 2018 It isn't possible to play certain part of animation only. Unless the part you want is like at the start. Then you can do as @pierremgi said and use switchMove command. Share this post Link to post Share on other sites
Grumpy Old Man 3540 Posted March 21, 2018 You could probably find a way around this using setAnimSpeedCoef and sleep, doubt sleep is precise enough to warrant extremely fast almost instant switches, also you'd need to find out the exact duration when you want the animation to return to regular speed. Unfortunately animationPhase doesn't work on infantry units, could be a solution otherwise. Cheers Share this post Link to post Share on other sites
crazy mike 567 Posted March 21, 2018 no to model.cfg animations and rtm animations aswell Share this post Link to post Share on other sites
blackburnrus 31 Posted March 22, 2018 I found a solution, I'm using moveTime and setAnimSpeedCoef When I brouse animations in animationlist and find acceptable timing for me (example 12.4) I'm pausing animation with setAnimSpeedCoef 0 when animation reaches acceptable timing. StopAnim01_PalecAndShag = { _a = moveTime twin1; if (_a > 12.4) exitWith {twin1 setAnimSpeedCoef 0;}; call StopAnim01_PalecAndShag; }; When I want to start animation with this place - Im using setAnimSpeedCoef 1; And I'm using twins, like @johnnyboy said 4 1 Share this post Link to post Share on other sites
johnnyboy 3743 Posted March 22, 2018 Nice going. Way to be persistent. Thanks for posting the solution to benefit others. 1 Share this post Link to post Share on other sites
HazJ 1288 Posted March 22, 2018 Oh wow, I was convinced it wasn't possible, I stand corrected then. Good work! Share this post Link to post Share on other sites