Search Unity

  1. If you have experience with import & exporting custom (.unitypackage) packages, please help complete a survey (open until May 15, 2024).
    Dismiss Notice
  2. Unity 6 Preview is now available. To find out what's new, have a look at our Unity 6 Preview blog post.
    Dismiss Notice

How can I remove "minus points" from my game?

Discussion in 'Editor & General Support' started by KIERO_, Oct 23, 2021.

  1. KIERO_

    KIERO_

    Joined:
    Oct 22, 2021
    Posts:
    4
    Hello,

    I downloaded a Quiz game from this person


    and I can set up how many points I can get if my answer is correct. If I choose wrong answer I got minus points (for example -10 because I set 10 points is for correct answer).

    How can I leave +points but remove -points?

    You can check this game on github https://github.com/WatchFindDo/QuizGameProject

    I am not that good at Unity (first time here) so every answer is really helpful!
     
  2. Kurt-Dekker

    Kurt-Dekker

    Joined:
    Mar 16, 2013
    Posts:
    38,915
    Steps to success:

    - find the code that adjusts the score by points

    - insert a check to ensure that the points value is non-negative
     
    KIERO_ likes this.
  3. JeffDUnity3D

    JeffDUnity3D

    Joined:
    May 2, 2017
    Posts:
    14,446
    I did find this, you might want to start here: https://github.com/WatchFindDo/Quiz...ameProject/Assets/Scripts/Mono/GameManager.cs This assumes you have some knowledge of C#, so you may need some C# tutorials first. I've heard good things about this one https://www.learncs.org/