Is the UID of the last leaf definitely 18? Yes normally this would just be done as animation, but since you are doing it this way you could link an instance variable on the leaf to health in one event, if leaf.num > health then destroy/hide. So your leaves have num 1,2,3,4,5. When health is 5, they all show, when health is 0, they are all hidden etc.