Slider Values

So I believe everything I did is good and all…and I am playing around with adding numbers to each location of the slider progress to help indicate what number question you are in the quiz…however when I play game the slider does not start at the far left of the bar and starts at the next tic up. I believe it is because we are calling the GetNextQuestion Method at Awake once we determine game is not complete and is increments up. Is this just how it is?

I fixed it. I created a new Method called SetProgressValue and placed it in the appropriate spot.

Nevermind there is a bug haha!!

Hi SHAMANWOLF,

Does that mean you were able to solve the problem? :slight_smile:


See also:

1 Like

Well…not entirely. I did place a new method to increment the slider on click. Not the most preferred as it made better sense to increment when LoadNewQuestion was called. When I added my new method to the else statement in Update, after the timer went out, I went straight to my game over screen. To get it to work how I want would need more time to rewrite my LoadNewQuestion…and since Im a newb, I will finish the course and come back better equipped so I do not get too far into the weeds now.
I ended up creating new text on my quiz canvas and set them to the appropriate locations under the slider. It just starts at 0 lol.
Now I am wrestling UI scales!

I don’t know if you already know this page in the manual but if not, take a look at it. The anchors are really helpful when designing a GUI in Unity.

https://docs.unity3d.com/Packages/com.unity.ugui@2.0/manual/UIBasicLayout.html

Regarding the other problems, I think it is a good idea to complete the project first. Then try to implement your own idea. From my experience, it can be quite challenging to fix conflicts with the instructor’s code if you are a beginner in programming. There is always a chance that Gary does something that breaks your solution, or that you implemented something that prevents Gary’s code from working. Once you completed your project based on Gary’s videos, it’ll be less ‘dangerous’ to add your own ideas.

1 Like

Thank you! Typically I like to stay within the boundaries of the course…but the hunger!! The hunger to implement smallish ideas motivated me to brain it out using a lot of the lessons here, plus studying the code itself to understand the logic. This was a hard section for me. But I succeeded! You should play ;P!
MOVIE QUOTE IMPOSTER | ShareMyGame.com

1 Like

Awesome! Your game looks really great. I can see that you put a lot of effort into your GUI. It definitely makes your game very unique. Keep up the good work! :slight_smile:

1 Like

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.

Privacy & Terms