ashurlee
Member
I have just created a walk animation for my character, which I initially implemented using this piece of code...
The sprite changes from walk to idle perfectly, however, issues have started appearing in some strange ways.
One of my abilities seems to be forced out of it's animation, or jumps between walk and the ability. It's hard to tell, things happen unusually fast.
And then another of my abilities, the particle object stops following the player half way through its animation. Which is even stranger as the particle is a separate object, with it's own code.
I have tried multiple ways of implementing the walk animation.
- having a separate state that activates on movement,.
- having a variable that is true or false based on movement, and having the sprite switch on based on that variable.
- Having no idle animation and only using the walk sprite.
-And various alteration on the code above.
Due to the issues happening even when i only use the walk sprite, i'm starting to think it's an issue with the sprite itself.
The walk sprite loops over 16 frames. But then all my other sprites also loopbut over varying number of frames, with no issue.
It's an odd one, hence my first time posting. Any advice would be great.
I wanted to upload clips but i'm not sure how best to go about that.
Thanks,
GML:
if (hspd != 0) || (vspd != 0)
&& (sprite_index != spr_hairdresser_walk)
{
sprite_index = spr_hairdresser_walk;
}
else
if (hspd = 0) && (vspd = 0)
&& (sprite_index != spr_hairdresser)
{
sprite_index = spr_hairdresser;
}
One of my abilities seems to be forced out of it's animation, or jumps between walk and the ability. It's hard to tell, things happen unusually fast.
And then another of my abilities, the particle object stops following the player half way through its animation. Which is even stranger as the particle is a separate object, with it's own code.
I have tried multiple ways of implementing the walk animation.
- having a separate state that activates on movement,.
- having a variable that is true or false based on movement, and having the sprite switch on based on that variable.
- Having no idle animation and only using the walk sprite.
-And various alteration on the code above.
Due to the issues happening even when i only use the walk sprite, i'm starting to think it's an issue with the sprite itself.
The walk sprite loops over 16 frames. But then all my other sprites also loopbut over varying number of frames, with no issue.
It's an odd one, hence my first time posting. Any advice would be great.
I wanted to upload clips but i'm not sure how best to go about that.
Thanks,