People usually think it is a good idea to use flags. They create a flag to store states of entities and think the problem is solved. Actually it sometimes duplicates the number of possible new problems.
I once tried to convince a friend not to use it. In a part of the code, I asked him: "Look, how can you guarantee that the states of the flags are consistent here?", he then added code just before the line to check for consistency of the flags. I then said that if the flags fell into an inconsistent state, then it should be fixed there, not when they are checked. He tried another fix: created "set methods" for each of the flags, each method called a function "checkFlags" which detected inconsistencies in the flags and automatically set them to a consistent state.
I continued: "Look, every time you add a new flag you will have to check this function and infer, among possible combinations, which are valid and which are not. If you need states, use an enumeration with few states all of which are consistent."
That is the problem with flag-oriented programming: each new flags doubles the number of possible states and it is very complicated to guarantee consistency between them considering all possible combinations and temptation to just add, set and check a new flag when writing code.