my script doesnt make any error…but dont want to repond…i dont get it
var InBag:GameObject[];
var InBag2:GameObject[];
function Refresh()
{
for(var x = 0; x < InBag.Length; x++){
var obl:GameObject[]= GameObject.FindGameObjectsWithTag("Untagged");
}
for(var i = 0; i < obl.length; i++){InBag2+=[obl*];}*
}
the var InBag2 is always empty on star…soppose i hav 5 gameObject in my InBag and i send message refesh from another script…dont worry its not the other script because i made it on start on this one to try…well my inbag2 saty empty…even if i have 100 stuffin my InBag…i just want to put the game object with certains tag to my other ‘‘arrray’’
I don't know anything about Unityscript, but in cs you have to cast it as an array type, like so: GameObject[] obl = GameObject.FindGameObjectsWithTag("Untagged") as GameObject[]; Maybe something like that would fix your problem as well?
– iwaldrop