Have a class of Ogre objects with their own individual healths and booleans, and make a vector of these Ogre objects that you loop through with each draw loop to move, etc.
like:
Class Ogre {
public:
int health;
bool dead;
Ogre() {
health = 100;
dead = false;
}
};
std::vector<Ogre> enemies; // this is like a variable size array of a user-defined type, in this case the type is Ogre
enemies.push_back(Ogre()); // to spawn a new Ogre, use push_back
In each game loop, go through each Ogre entity and do the relevant AI checks
for(int i = 0; i < enemies.size(); ++i) {
// loop through each Ogre entity in the vector enemies
// To get the current Ogre entity, use: enemies[i] in this case
}
There are many ways to loop through each Ogre entity inside the vector, the for loop is my personal preference, but using iterators will work