- Home /
button click event question
Hello!
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.
Thanks
Answer by MangoDerp · Apr 30, 2012 at 04:04 AM
I dont know any tutorials but my advice would be to start out learning the syntax of javascript
http://download.unity3d.com/support/documentation/Images/manual/ScriptingTutorial.pdf
Then moving on to learning how Random.range() works, http://unity3d.com/support/documentation/ScriptReference/Random.Range.html
Also learn how to construct a linked list(or any other suitable variable length arrays) in Js.
Your answer
