button click event question


I am stuck on a script, I am trying to let Unity3D pick a random mesh-01 to mesh-04. Once it’s picked the player needs to press the mesh then Unity picks 2 meshes after each other etc etc (Eeach round +1 untill the player picks a wrong one.)

I have been trying to use Button on click event on each mesh (true/false) if true +1 for the random pick, if false game over.

However I think I am messing this all up with flash actionscript, I am kinda new to Javascript.

If someone can help me with a good tutorial I would appreciate that quite a lot. I am stuck on this for a while now and I need a fresh look on this.


I dont know any tutorials but my advice would be to start out learning the syntax of javascript


Then moving on to learning how Random.range() works,

Also learn how to construct a linked list(or any other suitable variable length arrays) in Js.