i stored bot keys, i want to play whole usp move animation (swim, walk, duck, jump ...etc) with these keys.
PHP Code:
#define InMove (keys & IN_FORWARD || keys & IN_LEFT || keys & IN_RIGHT || keys & IN_BACK)
//new bool:onground = bot_data[frame_velocity][2] == 0.0 ? true : false
if (onground)
{
if ( keys & IN_DUCK && InMove )
{
set_entity_anim( id, 5 );
}
else if ( keys & IN_DUCK )
{
set_entity_anim( id, 2 );
}
else
{
set_entity_anim( id, 4 );
}
if ( keys & IN_JUMP )
{
set_entity_anim( id, 7 );
}
else
{
set_entity_anim( id, 4 );
}
}
else
{
set_entity_anim( id, 7 );
if ( keys & IN_DUCK )
{
set_entity_anim( id, 5 );
}
}
if(keys & IN_DUCK)
{
pev(id, pev_sequence ,16);
}
else
{
pev(id, pev_sequence ,19);
}
stock set_entity_anim(ent, anim)
{
entity_set_float(ent, EV_FL_animtime, get_gametime())
entity_set_float(ent, EV_FL_framerate, 1.0)
entity_set_int(ent, EV_INT_gaitsequence, anim)
}
i finished the animation
basically, but not so perfect (really tried many times). someone wrote these animations before? or help me to finish it perfectly please. sorry for my bad english