Turning off single object in an array

I have this code that lists an array of GUITextures, 16 in total. They all start disabled. What I want is that when I initially click the first GUI it activates the first object in my array; then when I click that GUITexture it is turned off and the next Texture in the array is turned on. I can turn them all off or on but for the life of me I can’t figure how to turn individual ones on.
I’m using C# too just fyi. Thanks!

 public class LegZoom2 : MonoBehaviour {

	public GameObject body;
	public GameObject player;
	public GameObject legcamera;
	public GUITexture backbutton;
	public GUITexture simtest;
	public GUITexture simpract;
	public GUIText simtext;
	public string[] myStrings; 
	public int currIndex;
	public GUITexture[] steps = new GUITexture [16];
	public int currIndexep;
	

	// Use this for initialization
	void Start () {
		
		
		Screen.showCursor = true;
	
	}
	
	
	// Update is called once per frame
	void Update () {
	
		Vector3 StartPos = legcamera.transform.position;
		Vector3 EndPos = new Vector3 (6.1f, 9.1f, -4.017f);

		
	if(((body.transform.position.x)-(player.transform.position.x)) <= 2.6f && (((body.transform.position.z)-(player.transform.position.z)) >= -1f||((body.transform.position.z)-(player.transform.position.z)) <=3.4f)) {
		
		legcamera.SetActive(true);
		player.GetComponent<AudioSource>().enabled = false;
		legcamera.transform.position = Vector3.Lerp (StartPos, EndPos, Time.deltaTime * 2);
		
		}
		
	else {
			legcamera.SetActive(false);
			legcamera.transform.position = new Vector3(4.54f, 9.434f, -3.932f);
			simtest.enabled = true;
			simpract.enabled = true;
			simtext.enabled = false;
			
			foreach (GUITexture obj in steps)
			{obj.active = false;
			}
			
		
		}
			
		if (simtest.HitTest(Input.mousePosition) && Input.GetMouseButtonDown(0)){
			
			simtext.enabled = true;
			simtest.enabled = false;
			simpract.enabled = false;
		}
		
		if(simpract.HitTest(Input.mousePosition) && Input.GetMouseButtonDown(0)){
			simtest.enabled = false;
			simpract.enabled = false;
			steps[0].enabled = true;
			
		}
			
		
		if (steps[0].HitTest(Input.mousePosition) && Input.GetMouseButtonDown(0)){
			currIndexep++;
			steps[currIndexep].enabled = true;
			steps[currIndexep--].enabled = false;
		}
		
	myStrings= new string[]{"Lateral Incision", "Mark Incision", "Incise skin & 
Subcutaneous Tissue", "Perform 'H-cut'; 
watch for peroneal nerve", "Lateral Incision Complete", "Medial Incision", "Mark Incision", "Expose and free Muscles", "Fasciotomy Complete"};
		
		if (simtext.HitTest(Input.mousePosition) && Input.GetMouseButtonDown(0)){
			
			currIndex++;
			simtext.text = myStrings[currIndex];
		}
	
		}
	}

I am assuming you’re setting currIndexep in the inspector? Because in the code it always stays null. And null++ is still null.

Also there are some logic problems in

    if (steps[0].HitTest(Input.mousePosition) && Input.GetMouseButtonDown(0)){
       currIndexep++;
       steps[currIndexep].enabled = true;
       steps[currIndexep--].enabled = false;
    }

First, you’re only checking hits or steps[0] in the if statement. I assume this would cause the problem after the first click, as steps[0] would be disabled then, and steps[1] would be the active one.

Next, you should really read up on the ++ and – some. currIndexep-- returns the value of currIntexep and THEN takes away 1. Also you don’t want to take away 1. You want to access currIndexep - 1.

currIndexep-- is the same as currIndexep = currIndexep - 1; You don’t want that here.

Additionally, you don’t even need to do that, your whole sequence can be

steps[currIndexep].enabled = false;
currIndexep++;
steps[currIndexep].enabled = true;

Finally, add a safety check. If currIndexep == theSizeOfYourArray - 1, you should manually set the last element to disabled and the first element to enabled and currIndexep to 0 agian.

It looks like actually in your code you are never leaving the first element:

   currIndexep++; //currindex goes from 0 to 1
   steps[currIndexep].enabled = true; //enables at index 1
   steps[currIndexep--].enabled = false; // currentindex goes from 1 to 0 JUST USE currIndexep-1.   "--" will apply the new value to currIndexep

It’s really unclear what you are trying to do since your parentheses are not formatted correctly. However, this function will turn only one element on. It basically turns every element off and turns on the one you want:

void TurnThisIndexOn(int index)
{
    foreach(GUITexture step in steps)
    {
        step.enabled = false; //or .active or .activeSelf or .SetActive depending on ur version of Unity
    }
    steps[index].enabled = true;
}

The second option is to keep track of which element it is currently on (with an int variable) and turn that index off before you turn on the next index with:

steps[currentIndex].enabled = false;
currentIndex = nextIndex;
steps[currentIndex].enabled = true;