Russell Posted September 21, 2020 Share Posted September 21, 2020 Hello there again team!! I have an animated 3D model with 2 animations: IDLE or STAND (frames: 0 to 400) TALKING (frame 0 to 950) And with a version of SimpleAnimation.lua like this: Script.Speed=4.0--float Script.Sequence="0"--string Script.Anim2Speed=4.0--float Script.Anim2Sequence="0"--string function Script:Start()--in self.entity:PlayAnimation(self.Sequence,self.Speed/100.0,1) end function Script:CambiaAnim()--in self.entity:PlayAnimation(self.Anim2Sequence,self.Anim2Speed/100.0,1) end With this script I can change the animation ok. But I need change animation from IDLE to TALKING and TALKING animation start from frame 450. Can I change the animation of my model starting always from frame 450? Is possible? Thank you very much!! Quote Link to comment Share on other sites More sharing options...
Marcousik Posted September 21, 2020 Share Posted September 21, 2020 idk if you can use frames for this, i'm not sure. But you could try using a timer by testing (for example:) if Time:GetCurrent() - self.FirstAnimStarted > 2000 then -- <start second animation> 1 Quote Link to comment Share on other sites More sharing options...
Russell Posted September 21, 2020 Author Share Posted September 21, 2020 56 minutes ago, Marcousik said: idk if you can use frames for this, i'm not sure. But you could try using a timer by testing (for example:) if Time:GetCurrent() - self.FirstAnimStarted > 2000 then -- <start second animation> Thanks Marcousik!! I like the idea, but I'm not sure if it works for me in my specific case. The animation is changed by pressing a button. From the IDLE animation (animation1) it goes to the TALK animation (animation2) and it starts at frame 0. It would be very useful for me to get the TALK animation to start at frame 450 the same moment I push the button. Anyway i will try this idea. Thanks!! Quote Link to comment Share on other sites More sharing options...
Thirsty Panther Posted September 21, 2020 Share Posted September 21, 2020 You could split your Talk animation in two. Talk 1 animation 0-950 Talk 2 animation 450-950 Then just call the animation you want. 1 Quote Link to comment Share on other sites More sharing options...
Solution Russell Posted September 21, 2020 Author Solution Share Posted September 21, 2020 2 hours ago, Thirsty Panther said: You could split your Talk animation in two. Talk 1 animation 0-950 Talk 2 animation 450-950 Then just call the animation you want. Thirsty Panther nice to read you too!! I love you man!! This save my day!! I didn't know that I could extract fragments of the animations openen in the *.mdl models from ASSETS tab!! Now i have "Talk2Ticket" animation for my model, and the full "Talk" animation for other actions ingame. Works great!! Thank you very much!! For other people if they reach this thread with the same question: 1 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.