Well, I haven't seen your new code yet but you need to iterate the tree array on each loop and call spofs for each of them. Since I see spset on the first pic, I assume that the code you posted is part of the initialization of your game.