Itās because you are a fairly new userā¦ the forum has a trust level for users which grows over time, as such there are some thresholds which limit what new users can do to start with, specifically the posting of the same/similar links and images - I unflagged it as spam, the original post is back, and Iāve popped the link out of the title as its in the post againā¦
I think Iāll need to see the rest of the code to really help, as the code that is posted doesnāt really cover the number entry system.
Updated Wed Nov 30 2016 11:11
On the very first screen where it says welcome and offers you the Start button, it didnāt matter how many times I pressed return, nothing happened. I clicked the mouse on the background and the button then lit up and I was taken into the game. I believe Ben mentions this issue in the lecture, with regards to the colour of the button text getting a bit āstuckā, I think this is a focusing issue within Unity. Iām guessing you are running Unity 4.6.x as per the course instructions, later you move on to Unity 5, I suspect this issue may remove itself at that point. So, for now Iām going to assume thatās the case and just āclickā on Start on the first screen and then see what happens after that.
Updated Wed Nov 30 2016 11:13
- Clicked Start with the mouse
- Typed in 300 with the main numeric character keys (I chose 225 in my head)
- Pressed Enter
- Game updated, told me there were 6 guessing remaining and guessed at 90
- Pressed the Up arrow
- Game updated, told me there were 5 guesses remaining and guessed at 219
- Pressed the Up arrow
- Game updated, told me there were 4 guesses remaining and guessed at 250
- Pressed the Down arrow
- Game updated, told me there were 3 guesses remaining and guessed at 238
- Pressed the Down arrow
- Game updated, told me there were 2 guesses remaining and guessed at 227
- Pressed the Down arrow
- Game updated, told me there was 1 guess remaining and guessed at 225 (the number I chose in my head)
- Pressed Enter
- Game updated, took me to the Win screen (e.g. it had won) and offered me the chance to try again
- Pressed Enter
- Game updated, took me to the Start screen
- Pressed Enter
- Game updated - BUG: It stated there were 2 guesses remaining and itās guess was 1.
- Pressed Enter
- Game updated, took me to the Win screen (e.g. it had won) and offered me the chance to try again
- Pressed Enter
- Game updated, took me to the Start screen
- Pressed Enter
It cycles after this point back to the line indicated BUG
You will need to ensure that you reset your number of allowed guesses and any other variables in use, Iām guessing perhaps that they are set as Static?
Other than that, allowing for the potential Unity issue with the first button press, Iād suggest this is fairly much working.
Updated Wed Nov 30 2016 11:26
This may be a potential fix for the issue you are experiencing with the button at the beginning, but Iāve not tested it and it is somewhat out of the scope of the course material at this point in the course. Could be worth a few minutes to try it though.
http://answers.unity3d.com/questions/820599/simulate-button-presses-through-code-unity-46-gui.html
What you are wanting to do is effective trigger the Text button to think the mouse is over it, e.g. highlighted, then, when the user presses the Enter key, it will activate - I believe.
Alternatively, I think the move to Unity5 will resolve this anyway in due course.