Making variables array and compare

In that function, hitarray is an array of actors.