Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

Question Creating question and answer game

Discussion in '2D' started by MohamedAlSayad, Mar 22, 2021.

  1. MohamedAlSayad

    MohamedAlSayad

    Joined:
    Mar 22, 2021
    Posts:
    3
    Hi,
    I'm a very beginner to learn Unity.
    I want to create a simple single or multiplayers question and answer game using Unity.
    A character or more will move on a map in specific positions with right answers.
    What I need to do?
    What I need to learn?
     
  2. Cornysam

    Cornysam

    Joined:
    Feb 8, 2018
    Posts:
    1,343
    Tutorials:

    Here is one for a question game:


    Here is one for character movement (I guessed you were making a top down, not platformer style):
     
  3. MohamedAlSayad

    MohamedAlSayad

    Joined:
    Mar 22, 2021
    Posts:
    3
    Thank you
    First video is really useful and I'll watch the rest of playlist.
    Movement that I mean isn't movement by direction but I mean the character will move automatically from a position to another when the player chooses the correct answer.
     
  4. Cornysam

    Cornysam

    Joined:
    Feb 8, 2018
    Posts:
    1,343
    Okay, so you are thinking that when the player gets a question right, the character will automatically move to a pre-set destination?
     
  5. MohamedAlSayad

    MohamedAlSayad

    Joined:
    Mar 22, 2021
    Posts:
    3
    Yes
    Character starts from a certain cell and moves to another one until he returns back to the first cell to win the game.
     
  6. Cornysam

    Cornysam

    Joined:
    Feb 8, 2018
    Posts:
    1,343
    You can probably look up pathing. Here is a video on a basic pathing:


    However, this one automatically switches to the next point when the character gets to the next one. So you will want to replace that logic of if(player.currentPos == nextPatrolPoint) to something like if(questionAnsweredCorrect)...then advance to next point. Shouldn't be terribly difficult to figure out once you get familiar with the code.