Quote:
Originally Posted by Ghosted
frames is not anim duration. frames must be divided by frames per second = duration.
|
Ah, thanks for the information.
So basically there's 141 Frames and FPS is 30 = 4.7.
So is this correct?
PHP Code:
public MakeAnim( id )
{
set_task( 4.7, "@RenewAnimation", id, .flags="b" );
}
@RenewAnimation( id )
{
Util_PlayAnimation( id, idle, 4.8 );
}
stock Util_PlayAnimation(index, sequence, Float: framerate = 1.0)
{
entity_set_float(index, EV_FL_animtime, get_gametime());
entity_set_float(index, EV_FL_framerate, framerate);
entity_set_float(index, EV_FL_frame, 0.0);
entity_set_int(index, EV_INT_sequence, sequence);
}
__________________