Zuljaras
Member
I have the following scenario.
I have arrack animation while on the ground and attack animation while in the air.
I want to be able to change my sprite from the air one to the ground one but keep the animation where it left off.
While I am in the air I have the sprite index to change from player_attack_air to player_fall while there is no solid ground beneath the player.
However if there is solid ground beneath the player and he is still in his air_attack animation I want him to change to his ground attack animation but start from the last image_index he was in the air attack sprite.
I have the following code for the moment:
I have arrack animation while on the ground and attack animation while in the air.
I want to be able to change my sprite from the air one to the ground one but keep the animation where it left off.
While I am in the air I have the sprite index to change from player_attack_air to player_fall while there is no solid ground beneath the player.
However if there is solid ground beneath the player and he is still in his air_attack animation I want him to change to his ground attack animation but start from the last image_index he was in the air attack sprite.
I have the following code for the moment:
Code:
if sprite_index == playersattackright_air
{
im = image_index;
}
if sprite_index==playersattackright_air && !place_free(x,y+vspeed) && sprite_index != playersattackright
{
sprite_index = playersattackright;
image_index = im;
image_speed = 0.3;
}