It seems to me that setting a new animation sets a sprite's [Platform].VectorX back to 0. I'm not 100% positive that this is what's happening, but I can see no other explanation for what I'm seeing, and I'm looking for a confirmation and/or an alternate method to accomplish my goal.
I have a sprite that starts at a speed of 10 (or -10, depending on whether he's facing left or right) and gradually accelerates until he either collides with a wall, or collides with the player. This resets his speed back to 0, and he begins to accelerate again towards the player. Think of any generic charging-bull type boss in a sidescroller.
What I'm trying to do is change his animation to something else once he reaches a particular speed (let's call it 250 for sake of ease). Every time he reaches this speed, he pauses briefly, and then starts over again from speed 10. It seems to me that the act of setting a new animation is causing his speed to drop back to 0, which resets his animation to the "moving slowly" animation.
Just to get it out of the way before any questions come up, before I started playing with animations his movement was exactly the way I wanted it; the only thing I've changed since is adding statements saying essentially (if AnimName="blah" and speed<blah then set animation "otherblah").
So... any ideas?