Well you'll need to have a variable to tell the player that it is in "big" state. That way when you have other events that call ChangeAnimation, they can change the animation properly (so move right, or big move right). Here are some possible methods. One you can have in the collision with the mushroom a variable flipped, and use a switch whenever you have an animation call.
player -> Collision with mushroom -> Script Editor
- Code: Select all
powered=1;
player -> Any event that would change the animation -> Script Editor
- Code: Select all
switch(powered)
{
case 0:
ChangeAnimation("Event Actor", "move_right", NO_CHANGE);
break;
case 1:
ChangeAnimation("Event Actor", "big_move_right", NO_CHANGE);
break;
}
You could also make the animations ordered symmetrically, so you can use this. STAND would be a definition probably set to 0 (to show the animindex of the stand animation). powered is the same variable as above. The 6 is signifying that there are 6 animations for the player, 0-5 are the small ones, making 6-11 the big ones.
- Code: Select all
ChangeAnimation("Event Actor", getAnimName(STAND+powered*6), NO_CHANGE);
You could also use a different actor that uses inheritance to have all of the player's abilities but have different animations. Thinking about it this is the simplest method (depending on how you do view control). All you need to do is make sure the small player is destroyed and you create the big one in the same spot.