How do I select all other arrays

I am trying to make a simple inventory and I want all the arrays that arnt in my hand to do something else.

public int e;
    public GameObject items[];
    public Transform Hand;
    public Update()
    {
        if(Input.getKeyDown(keycode.t))
        {
          items[e].transform.position = Vector3.Lerp(items[e].transform.position, Hand.position, step);
    		items[e].transform.rotation = transform.rotation * Quaternion.Euler(0, 90, 0);
        }
        //trying to tell all other arrays(items) to do this besides [e]
        if(Items[])
        {
         //do somthing
        }
    }

I left some of the code out to shorten it

1 Answer

1

for(int i = 0; i < items.Length; i++)
{
if(i != e)
{
//do something
}
}