Hi, I hardly tried to figure it out by myself and searched in the forum, but failed

Well, there are 2-3 or more objects of the same type, and all of them have their private variable (Action Points).If one of the objects finished "his turn", his private variable (AP) equals zero,and another object automatically activates (of course, if his ActionPoints > 0).

So, how to select another object of the same type (his private variable should be >0) after the fist object's private variable check?

Other idea would be checking the ap with a function, that you call after every ap using event, that checks if the ap are 0 and if they are, run the selection again. Performance-wise this would be a bit faster than running the event every turn.