In my games, i have a hint button. Mean that players can have only 3 hints. What i want to ask is how can i tell the player how much hints left for them to use?
GUI.Button(Rect((Screen.width/2)+320, (Screen.height/2)+280, 100, 50),"Hint3");
GUI.Button(Rect((Screen.width/2)+320, (Screen.height/2)+280, 100, 50),"Hint2");
GUI.Button(Rect((Screen.width/2)+320, (Screen.height/2)+280, 100, 50),"Hint1");
private var hintList : Array = new Array();
so when the player click hint, i will need to push one of the hints from the list to the player. HOw can i go about doing it??
I cannot understand why you are getting the error. Follow these steps EXACTLY : * In Unity : File => New Scene Create => Javascript * In your web browser : click on this link => http://www.alucardj.net16.net/unityanswers/script%20test%20buttons.js Select all and Copy. * In Unity : Open the new script created. Select all and Paste. Save the script. Attach the script to the Main Camera. Play the scene. Your result should be exactly the same as : http://www.alucardj.net16.net/unityanswers/hintbutton1-1.html
– AlucardJay