[Please disregard, the problem fixed itself somehow right after I posted. Go figure.]
Hi, me big dum nooby.
I’m messing around with learning animation scripts from a tutorial, where different animations are triggered by pressing various keys. To be slick, I’ve changed all the if-then clauses to script-case. Here’s the code:
switch (Input.inputString)
{
case "1":
anim.Play ("WAIT01", -1, 0f);
break;
case "2":
anim.Play ("WAIT02", -1, 0f);
break;
case "3":
anim.Play ("WAIT03", -1, 0f);
break;
case "4":
anim.Play ("WAIT04", -1, 0f);
break;
case "5":
anim.Play ("UMATOBI00", -1, 0f);
break;
case "6":
anim.Play ("WAIT04", -1, 0f);
break;
}
Everything worked fine until I added case “6”. No compile errors or anything, it just won’t play. In the above I changed the animation to one of the others to make sure that it wasn’t a problem with the animation setup.
Is there some typo I’m not seeing, or is there a limit to the number of cases you can have in a switch clause?
Thanks for your kind correction.