- Home /
Question by
Madswint · Nov 09, 2013 at 10:51 AM ·
guicountergui-buttoncalculation
What do I add to this script, so if you clicked the button ex. 30 times, a gui.box will appear?
var clickCounter: int;
var mySkin : GUISkin;
function OnGUI () {
if (GUI.Button(Rect(Screen.width / 2, Screen.height / 2, 100, 30), "Wictors: " + clickCounter)) {
clickCounter ++;
}
GUI.skin = mySkin;
GUI.Box (Rect (10,10,240,100), "testytest");
}
What can I add, so if you clicked a specified number of times, something will happend. I'm just stuck with how I should get it to count them and activate when it hits a number. Any tips? Thanks in advance
Comment
Your answer
Follow this Question
Related Questions
Shot Counter Question 2 Answers
GUI Text Score counter 3 Answers
problem with gui 2 Answers
Little image next to GUI ? 1 Answer
Changing the font size of a GUI.Button in the inspector 1 Answer