Question by
$$anonymous$$ · Jun 01, 2016 at 09:56 AM ·
animationidle animations
Random legacy idle animation
Hello i'm trying to do some random animations with this java script:
#pragma strict var puppet: GameObject; var actions : String[]; actions[0] = "idle"; actions[1] = "applause"; actions[2] = "applause2"; actions[3] = "celebration"; actions[4] = "celebration2"; actions[5] = "celebration3"; function Update () { var random = actions[Random.Range (0, 5)]; GetComponent.<Animation>().Play("" + random); }
but when i but this script on the character this happens: GIF it just skips thru all the animations without waiting for the last one to finish.
Comment