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

help for scripting

Discussion in 'Scripting' started by mentalrealm2612, Dec 28, 2014.

  1. mentalrealm2612

    mentalrealm2612

    Joined:
    Nov 14, 2014
    Posts:
    45
    hi guys I have a question

    5 number will appear on game example ;1,2,3,4,5 this numbers will appear with order
    examp
    first 5
    second 3
    third 4
    four 2
    five 1
    this all number will show in game side by side

    and player click this number with order
    he must folllow numbers 5,3,4,2,1
    if he click wrong game start again

    the real question is how can I do this :D
    I need script examp
    if someone help me he will make a big favor :S

    by the way I'm writing from turkey my English have limit my english can be bad
    thanks
     
  2. MathiasDG

    MathiasDG

    Joined:
    Jul 1, 2014
    Posts:
    114
    You are looking at something like:

    int i = 0;
    if (Player clicks on number n)
    {
    if(n = list(i))
    then i++;
    else restart;
    }
     
  3. shaderop

    shaderop

    Joined:
    Nov 24, 2010
    Posts:
    942
    Show what code you have already written and maybe we someone will help you improve it. If you haven't written anything yet then perhaps you need to spend some more time learning the basics.
     
  4. mentalrealm2612

    mentalrealm2612

    Joined:
    Nov 14, 2014
    Posts:
    45
    I made a game I finished almost everything backstage, start,exit button, load new level I wrote their code but I'm stuck here unfortunately I got nothing for this script

    I will explain again

    this numbers will show on game 1 2 3 4 5
    but number will turn random before show
    3 4 5 1 2

    player will select number with true order if he make wrong game will start again


    thanks proposition for learning the basics. but I said before my english not so good I can't understand video too much
    just help me for this script

    I'm using c#sharp
     
    Last edited: Dec 29, 2014