- Code: Select all
ChangeAnimation("Event Actor", "WalkRight", FORWARD);
or just a change animation event, put script editor with
- Code: Select all
switch (lifestate)
{
case 1:
ChangeAnimation("Event Actor", "WalkLeftSmall", FORWARD);
break;
case 2:
ChangeAnimation("Event Actor", WalkLeftBig", FORWARD);
break;
...
}
You can add other stuff for other bonuses you can get, such as fireball.
On your collision with mushroom, set lifestate to 2 and change the animation to the animation required. (you might want to test any variables you are using for movement to change to the right animation). On a collision with an enemy (or anything that hurts)
- Code: Select all
if (lifestate == 1)
{
//the script you want when you die
}
else
{
//the script for changing animation to small
lifestate = 1;
}
If you have any questions or problems, just ask.