ArcadEd: Thanks, but this i know Like i said, i don't want change the speed of the current animation but of another animation my sprite has.
I make a platformer and want when my character loses too much energy, that his idle animation plays more fast than normally. My character sprite has 3 different animations: idle, run and jump. If the player releases the keys i switch to the idle state (so, current animation is idle now). The problem is, if i set the animation speed here, it doesn't always work. Because of this, i want to change the speed of idle already more early, when the player sprite still is in jump or run state and gets hurt/loses energy.
I had one idea now (in the shower ), but still did not test it:
maybe i can save the current animation name in a string, change animation to idle, set speed and change back to the animation i saved in the string variable. This could work, but i wish there would be a field to access all animations of a sprite easily.