Model Animation
How do I properly set a model animation? Let's say my model has these sequences:
- dummy - death - idle 1. How do I make 'idle' as the default state? Right now it is in dummy as default because it's the first one in list, and to make it stay like that. 2. How do I play the 'death' animation when the player dies? I tried using PreThink but there was 2 flaws: - Because the animation was updated a lot of times in a single frame, it was weird - When player died, and then later spawned, the animation was being changed on the other model too. |
Re: Model Animation
Code:
stock Util_PlayAnimation(index, sequence, Float: framerate = 1.0) |
Re: Model Animation
Quote:
|
Re: Model Animation
Quote:
Code:
entity_set_float(index, EV_FL_animtime, get_gametime()); |
Re: Model Animation
I checked with Jed's Half Life Viewer and idle animation has 141 frames, does that mean I have to use 141.0 as the framerate?
So, something like this? PHP Code:
|
Re: Model Animation
frames is not anim duration. frames must be divided by frames per second = duration.
|
Re: Model Animation
Quote:
So basically there's 141 Frames and FPS is 30 = 4.7. So is this correct? PHP Code:
|
Re: Model Animation
framerate should be 1.0 i think its multiplier of animation FPS
|
Re: Model Animation
Quote:
|
Re: Model Animation
animtime is when animation started. at set_task you dont need to reSet sequence id, only animtime would be enough. for so in task call you should only use animtime = gametime
|
| All times are GMT -4. The time now is 12:47. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.