In my game I have a character selection screen and based on which character is chosen, the instance variable is updated. For example, if I click on a knight, the "Character" instance variable is chqanged to 2P, or if I click on a king, the "Character" variable is changed to 3P. I want to have all of the playable characters as animations in a single sprite. I was wondering if there was a way that I could set the player's animation to the "Character" instance variable and select a character this way. Sorry if that sounded confusing, but is there a way to do this?
Develop games in your browser. Powerful, performant & highly capable.
Yes by using the dedicated sprite action "Set animation" and "link to" the instance variable there.
You can check this tutorial that explains (amongst other things) how to do that : scirra.com/arcade/tutorial-games/shooting-gallery-2252