How do you set up a multiple options loop where the correct option changes randomly after selected?

I am making a game where there are multiple options (gui textures; I finished this part) and the avatar’s (sphere I made) mood (texture) changes when you choose the bad or right option, but when you choose the correct option, the happy mood (texture) stays for 1.5 seconds, changes to the first mood, and the correct option changes to another option randomly. Is there a way to loop these actions until my time limit I set is up?

As with most thing in Unity, there are many ways to solve this problem. One suggestion is to create a Controller script and place it on a game object named “Controller”. The controller script will be where the button presses are processed using its ButtonClick() function. The script on the buttons could then be something like:

#pragma strict

var id : int = 0;

private var controller : Controller;

function Start() {
    controller = GameObject.Find("Controller").GetComponent(Controller);

function OnMouseDown() {

You would set unique id for each button in the Inspector. The ids would be consecutive starting at 0. For each round, the controller script would be the thing that decides which button is correct. It can do pick one using (as @meat5000 suggests) Random.Range(). Note that the integer version of Random.Range() is exclusive of the last value. For example Random.Range(0,3) only returns values 0, 1, and 2.

The controller script would also be the place that changes the face, ups the score, and checks the time.