Can someone please tell me how can i or give me an idea of how can i make the player strafe backwards 100 quants and play the full strafe back animation by pressing only once the key?
I tryed this code below, but the player doesn't move...
if (key_space == 0 && key_space_press == 1)
{
key_space_press = 0;
}
if (key_space == 1 && key_space_press == 0 && key_s)
{
player.blendframe = unarmedB;
key_space_press = 1;
my.strafeForce = 250;
my.animate2 = 0;
my.animblend = blend;
my.strafeForce = maxv(-30, my.strafeForce);
my.strafeVelocity += (time_step * my.strafeForce) - (minv(time_step * 0.7, 1) * my.strafeVelocity);
my.strafeSpeed = my.strafeVelocity * time_step;
}
Thanks