Run through hastable of objects

Well I’m running through a hastable of objects in order to set them as active (they are unactive as default).

for (var item : DictionaryEntry in player1hand){
var temp : Transform = player1hand[item.Key];
temp.active =true; }

being player1hand the hastable. I have two keys but only activates one object, why Is that?

I have a feeling that you actually don’t need a Hashtable / Dictionary. An ordinary List will do.

You need to import the System.Collections.Generic namespace at the top of your script in order to use the generic List.

// UnityScript
var player1deck = new List.<Transform>();

A List allows adding and removing of elements but behaves like an ordinary array.

player1deck.Add(T1);
player1deck.Add(T2);
player1deck.Add(T3);
print(player1deck.Count);     // prints "3"

print(player1deck[0].name);   // T1
print(player1deck[1].name);   // T2
print(player1deck[2].name);   // T3

player1deck.Remove(T2);

print(player1deck[0].name);   // T1
print(player1deck[1].name);   // T3
print(player1deck[2].name);   // ERROR since there are only 2 elements in the list

player1deck.RemoveAt(0);      // removes the first(index 0) element
print(player1deck.Count);     // prints "1"