[Help] How to make range choosable by the player and a small error about saying lie to code

Hey I just watched the wrap up part of the NumberWizard and I wanted to try as they said “choosable range” for the player.

I knew from University basic java coding and there was a function as “ReadInt()” which you can understand that what I was looking for in C#. I found NetworkReader.ReadInt16() function and it was the thing that I need but it didnt work in my code. Is there a function which gives that? or should we write with bare hands like in mediveal ages?

NetworkReader.ReadInt16()

And the other thing, I wanted say lie to the wizard I put a number in my head and when he/she knew it I didnt press the return key. So my wizard should say to me:

else if( max == min) {
        print("Why da **** u lyin ?");       
    }

However there is an error, wizards say that I am lying but after asking same number twice.


How can I change it ?

Take a look at Random.Range().

The reason your code fires on the second value of 1 appearing is most likely because of the order in which you are setting max and min… you’ve not posted the full code though so it’s only a guess.

Please be aware that we do have younger members in the community here - thanks.

Privacy & Terms