Try this

:
Code:
function attackit
{
while(player != null)
{
ani_attack1_speed = 8;
ani_attack2_speed = 8;
randomize();
my.attack_choose = int(random(2));
if(my.attack_choose == 0)
{
while (ani_attack1 < 100) // Solange ani....
{
ani_attack1 += (ani_attack_speed * time_step)%100; // Ani Speed
ent_animate(my, "attack", ani_attack1, 0); // Ani Bfehl
wait(1);
}
ani_attack1 = 0;
}
if(my.attack_choose == 1)
{
while (ani_attack2 < 100) // Solange ani....
{
ani_attack2 += (ani_attack2_speed * time_step)%100; // Ani Speed
ent_animate(my, "attack2", ani_attack2, 0); // Ani Bfehl
wait(1);
}
ani_attack2 = 0;
}
wait(1);
}
}
If this doesn't work, try changing the 100 value into 99.
Cheers
Frazzle