AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   NPC animations (https://forums.alliedmods.net/showthread.php?t=249665)

usaexelent 10-09-2014 22:29

NPC animations
 
Does anyone know how to fix npc animations, I want npc animations to be played smooth after I set anim and not played instantly from other point...

My animation function:

PHP Code:

stock Util_PlayAnimation(indexsequenceFloatframerate 1.0)  { 
    
    
set_pev(indexpev_movetypeMOVETYPE_NONE)
    
entity_set_float(indexEV_FL_animtimeget_gametime()); 
    
entity_set_float(indexEV_FL_framerate,  framerate); 
    
//entity_set_float(index, EV_FL_frame, 0.0); still the same after I removed this.
    
entity_set_int(indexEV_INT_sequencesequence); 
    
set_pev(index,pev_gaitsequence,sequence// Not sure if this even does anything...
    
set_pev(indexpev_movetypeMOVETYPE_STEP)    


https://forums.alliedmods.net/showthread.php?t=184842 this thread has the same problem as me.

usaexelent 10-11-2014 08:37

Re: NPC animations
 
Solved, I don't know why but I just had to apply some velocity on npc to make animations play smoothly.


All times are GMT -4. The time now is 17:40.

Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.