Hi,
First of all, this what your original code should look like.
This is your original animation code:
function player_animations(){
my.animation %= 100;
if (my.animation < 0) { my.animation += 100; }
if (my.state_player == stand) {
my.animation += 2 * time_step;
ent_animate (my, "stand", my.animation, ANM_CYCLE);
}
if (my.state_player == run) {
my.animation += 8.4 * time_step;
ent_animate (my, "walk", my.animation, ANM_CYCLE);
}
}
And this is what it should look like:
function player_animations(){
if (my.animation > 100) my.animation -= 100;
if (my.state_player == stand) {
my.animation += 2 * time_step;
ent_animate (my, "stand", my.animation, ANM_CYCLE);
}
if (my.state_player == run) {
my.animation += 8.4 * time_step;
ent_animate (my, "walk", my.animation, ANM_CYCLE);
}
}
To blend between the animations, you need to use ent_blendframe().
Hope that helps.
