[SOLVED] Changing Animations for A Sprite with transformation

I am making a sort of Open World Top-Down game. I have an object “Player” which has a animation called “Transformation”. I have also made different animations for the normal sprite and the transformed sprite. the sprite to change it animations according to the animations. i.e. if the animation is the normal one it should play the normal variations if it is the transformed one it should play the transformed variations.


Please Help Me I am only 13.

You would need to make proper names of your animations
For example
Right Walk Normal
Right Walk Transformed

Now you make string variable and call it for example PlayerState which you set to normal if player is Normal and to Transformed if player is transformed
For example you press idk Q key and that variable switches between Normal and Transformed
Now what you do is in your change animation by name action
You put there string like
"Walk Right "+VariableString(PlayerState)

And that is all you need
If you walk right it will show proper animation depending on if your player is transformed or not


This is the updated code. Now the animations don’t seem to play.

Here i have 4 animations
Down Idle Normal
Down Idle Transformed
Down Move Normal
Down Move Transformed

Normal have blue shirt while transformed have red
That is only difference

Here going from top to bottom
I press space to toggle boolean variable StateSwitcher

Next event i check if variable StateSwitcher is false
If it is i set string of PlayerState variable to “Normal”

Next event i check if variable StateSwitcher is true
If it is i set string of PlayerState variable to “Transformed”

And last two events are simply holding or releasing S key
Where i either change animation by name to "Down Move " or "Down Idle "
With +VariableString(PlayerState)

Now hold S key and press space

1 Like

Thanks it works now.

1 Like