12 models appearing according to 4 variables, 2 switches - programming logic help

Im a novice programmer and just need some help on how to go about programming this task as i am doing it as a learning experience to improve my programming skills.

I have 12 versions of a model , each of which need to appear when the relevant settings are set.

the variables are 4 values, and then two on/off switches, of which only one can be on at any time, which creates 12 states in total. only one switch can be on but both can be off.

the possible settings are as follows:

variable - switch1 - switch2

1 - off - off

1 - on - off

1 - off - on

2 - off - off

2 - on - off

2 - off - on

3 - off - off

3 - on - off

3 - off - on

4 - off - off

4 - on - off

4 - off - on

I hope this makes sense, the way I would have done it in flash is to have 4 radiobuttons, and then two checkboxes and the update function would check the states of the checkboxes and then display the coresponding image (alpha) and hide the others.

alt text

what would be the best way to put this logic into practise in unity3 using JavaScript so that whenever a value is changed I can run the relevant renderer.enabled functions to show and hide the 11 models. I have already created the 11 models but cant figure out how to get the logic working right. I have tried to use 4 buttons and two toggles.

Manged to work this one out with a bit of help from forums and unity answers. I used the toolbar row of buttons so that the 4 values could be selected , then just added two toggles and then used an if(GUI.changed) to update the state of the scene with multiple if statements.

to make sure only one toggle could be selected i created two functions that were called by the toggles to make sure the other toggle got switched off.

http://img143.imageshack.us/img143/4905/variables.jpg

not sure if this was the best way to go about it, but im a beginner programmer so was quite pleased with myself.

 var toggleBrie = false;
var toggleVert = false;
var box1 : GameObject;
var box2 : GameObject;
var box3 : GameObject;
var box4 : GameObject;
var box5 : GameObject;
var box6 : GameObject;
var box7 : GameObject;
var box8 : GameObject;
var box9 : GameObject;
var box10 : GameObject;
var box11: GameObject;
var box12: GameObject;

var toolbarInt = 0;
var toolbarStrings : String[] = ["0.19", "0.29", "0.4", "0.64"];

function Start(){
                box1.SetActiveRecursively(true);
                box2.SetActiveRecursively(false);
                box3.SetActiveRecursively(false);
                box4.SetActiveRecursively(false);
                box5.SetActiveRecursively(false);
                box6.SetActiveRecursively(false);
                box7.SetActiveRecursively(false);
                box8.SetActiveRecursively(false);
                box9.SetActiveRecursively(false);
                box10.SetActiveRecursively(false);
                box11.SetActiveRecursively(false);
                box12.SetActiveRecursively(false);
}

function OnGUI () {
    GUI.skin = mySkin;

    GUI.BeginGroup (Rect (Screen.width - Screen.width + 20, Screen.height - Screen.height + 20, 300, 300));
    GUI.Label (Rect (20, 20, 100, 30), "G-Value");

    toolbarInt = GUI.Toolbar (Rect (20, 50, 250, 30), toolbarInt, toolbarStrings);
    GUI.EndGroup ();

        GUI.BeginGroup (Rect (Screen.width - Screen.width + 20, Screen.height - Screen.height + 80 , 400, 400));
    GUI.Label (Rect (40, 48, 200, 30), "Horizontal Shading");
    //toggleBrie = GUI.Toggle (Rect (25, 70, 50, 30), toggleBrie, "Value1");
    SetBrie (GUI.Toggle (Rect (20, 50, 100, 30),toggleBrie, ""));

    GUI.EndGroup ();

    GUI.BeginGroup (Rect (Screen.width - Screen.width + 20, Screen.height - Screen.height + 125 , 400, 400));
    GUI.Label (Rect (40, 48, 200, 30), "Vertical Shading");
    //toggleVert = GUI.Toggle (Rect (25, 70, 50, 30), toggleVert, "Value1");
    SetVert (GUI.Toggle (Rect (20, 50, 50, 30), toggleVert, ""));
    GUI.EndGroup ();

    GUI.Box (Rect (Screen.width - 115,40, 75, 85), logo);
    GUI.Label (Rect (Screen.width - 210, Screen.height - 60, 300, 30), texter);

    if(GUI.changed){
            if (toolbarInt == 0){
                box1.SetActiveRecursively(true);
                box2.SetActiveRecursively(false);
                box3.SetActiveRecursively(false);
                box4.SetActiveRecursively(false);
                box5.SetActiveRecursively(false);
                box6.SetActiveRecursively(false);
                box7.SetActiveRecursively(false);
                box8.SetActiveRecursively(false);
                box9.SetActiveRecursively(false);
                box10.SetActiveRecursively(false);
                box11.SetActiveRecursively(false);
                box12.SetActiveRecursively(false);
            }

            if (toolbarInt == 0 & toggleBrie == true){
                box1.SetActiveRecursively(false);
                box2.SetActiveRecursively(true);
                box3.SetActiveRecursively(false);
                box4.SetActiveRecursively(false);
                box5.SetActiveRecursively(false);
                box6.SetActiveRecursively(false);
                box7.SetActiveRecursively(false);
                box8.SetActiveRecursively(false);
                box9.SetActiveRecursively(false);
                box10.SetActiveRecursively(false);
                box11.SetActiveRecursively(false);
                box12.SetActiveRecursively(false);
            }

            if (toolbarInt == 0 & toggleVert == true){
                box1.SetActiveRecursively(false);
                box2.SetActiveRecursively(false);
                box3.SetActiveRecursively(true);
                box4.SetActiveRecursively(false);
                box5.SetActiveRecursively(false);
                box6.SetActiveRecursively(false);
                box7.SetActiveRecursively(false);
                box8.SetActiveRecursively(false);
                box9.SetActiveRecursively(false);
                box10.SetActiveRecursively(false);
                box11.SetActiveRecursively(false);
                box12.SetActiveRecursively(false);
            }

            if (toolbarInt == 1){
                box1.SetActiveRecursively(false);
                box2.SetActiveRecursively(false);
                box3.SetActiveRecursively(false);
                box4.SetActiveRecursively(true);
                box5.SetActiveRecursively(false);
                box6.SetActiveRecursively(false);
                box7.SetActiveRecursively(false);
                box8.SetActiveRecursively(false);
                box9.SetActiveRecursively(false);
                box10.SetActiveRecursively(false);
                box11.SetActiveRecursively(false);
                box12.SetActiveRecursively(false);
            }

            if (toolbarInt == 1 & toggleBrie == true){
                box1.SetActiveRecursively(false);
                box2.SetActiveRecursively(false);
                box3.SetActiveRecursively(false);
                box4.SetActiveRecursively(false);
                box5.SetActiveRecursively(true);
                box6.SetActiveRecursively(false);
                box7.SetActiveRecursively(false);
                box8.SetActiveRecursively(false);
                box9.SetActiveRecursively(false);
                box10.SetActiveRecursively(false);
                box11.SetActiveRecursively(false);
                box12.SetActiveRecursively(false);
            }

            if (toolbarInt == 1 & toggleVert == true){
                box1.SetActiveRecursively(false);
                box2.SetActiveRecursively(false);
                box3.SetActiveRecursively(false);
                box4.SetActiveRecursively(false);
                box5.SetActiveRecursively(false);
                box6.SetActiveRecursively(true);
                box7.SetActiveRecursively(false);
                box8.SetActiveRecursively(false);
                box9.SetActiveRecursively(false);
                box10.SetActiveRecursively(false);
                box11.SetActiveRecursively(false);
                box12.SetActiveRecursively(false);
            }

            if (toolbarInt == 2){
                box1.SetActiveRecursively(false);
                box2.SetActiveRecursively(false);
                box3.SetActiveRecursively(false);
                box4.SetActiveRecursively(false);
                box5.SetActiveRecursively(false);
                box6.SetActiveRecursively(false);
                box7.SetActiveRecursively(true);
                box8.SetActiveRecursively(false);
                box9.SetActiveRecursively(false);
                box10.SetActiveRecursively(false);
                box11.SetActiveRecursively(false);
                box12.SetActiveRecursively(false);
            }

            if (toolbarInt == 2 & toggleBrie == true){
                box1.SetActiveRecursively(false);
                box2.SetActiveRecursively(false);
                box3.SetActiveRecursively(false);
                box4.SetActiveRecursively(false);
                box5.SetActiveRecursively(false);
                box6.SetActiveRecursively(false);
                box7.SetActiveRecursively(false);
                box8.SetActiveRecursively(true);
                box9.SetActiveRecursively(false);
                box10.SetActiveRecursively(false);
                box11.SetActiveRecursively(false);
                box12.SetActiveRecursively(false);
            }

                if (toolbarInt == 2 & toggleVert == true){
                box1.SetActiveRecursively(false);
                box2.SetActiveRecursively(false);
                box3.SetActiveRecursively(false);
                box4.SetActiveRecursively(false);
                box5.SetActiveRecursively(false);
                box6.SetActiveRecursively(false);
                box7.SetActiveRecursively(false);
                box8.SetActiveRecursively(false);
                box9.SetActiveRecursively(true);
                box10.SetActiveRecursively(false);
                box11.SetActiveRecursively(false);
                box12.SetActiveRecursively(false);
            }

            if (toolbarInt == 3){
                box1.SetActiveRecursively(false);
                box1.SetActiveRecursively(false);
                box2.SetActiveRecursively(false);
                box3.SetActiveRecursively(false);
                box4.SetActiveRecursively(false);
                box5.SetActiveRecursively(false);
                box6.SetActiveRecursively(false);
                box7.SetActiveRecursively(false);
                box8.SetActiveRecursively(false);
                box9.SetActiveRecursively(false);
                box10.SetActiveRecursively(true);
                box11.SetActiveRecursively(false);
                box12.SetActiveRecursively(false);
            }

            if (toolbarInt == 3 & toggleBrie == true){
                box1.SetActiveRecursively(false);
                box2.SetActiveRecursively(false);
                box3.SetActiveRecursively(false);
                box4.SetActiveRecursively(false);
                box5.SetActiveRecursively(false);
                box6.SetActiveRecursively(false);
                box7.SetActiveRecursively(false);
                box8.SetActiveRecursively(false);
                box9.SetActiveRecursively(false);
                box10.SetActiveRecursively(false);
                box11.SetActiveRecursively(true);
                box12.SetActiveRecursively(false);
            }

            if (toolbarInt == 3 & toggleVert == true){
                box1.SetActiveRecursively(false);
                box2.SetActiveRecursively(false);
                box3.SetActiveRecursively(false);
                box4.SetActiveRecursively(false);
                box5.SetActiveRecursively(false);
                box6.SetActiveRecursively(false);
                box7.SetActiveRecursively(false);
                box8.SetActiveRecursively(false);
                box9.SetActiveRecursively(false);
                box10.SetActiveRecursively(false);
                box11.SetActiveRecursively(false);
                box12.SetActiveRecursively(true);
            }
        }

}   

function Update () {
//  Debug.Log(toolbarInt);

    if (Input.GetKeyDown(KeyCode.Escape)) {
        Application.Quit();
        }
}

function SetVert (state : boolean)
{
    if (state)
    {
        SetBrie (false);
    }
    toggleVert = state;
}

function SetBrie (state : boolean)
{
    if (state)
    {
        SetVert (false);
    }
    toggleBrie = state;
}