Most are probably familiar with using this method (maybe some newbies aren't) but it has hidden benefits.

This is the way to do more advanced AI. I use it for AI that I want to patrol, stand still, hear noises, run away, reload their gun, see enemies, etc.

The basic princible is that every action the enemy does is assigned to an Alterable Value. So, if you wanted to be walking, Alt Value 1 would be, say 2, and for shooting it would be 3.

This way, you can get your AI much more complicated. You have one event thats sets your alterable value, say

If 'Goodguy' is overlapping 'Badguys line of sight'
and Alt Value 1 of 'Bagguy' <= 2
Then set Alt Value 1 of 'Badguy' to 3

So, you get the idea. But the best thing about this method is that you can have two groups of actions, say for aggressive and non aggressive. You make shooting, punching, kicking or whatever all assigned to values above 5, whilst patrolling and standing etc can be 0-5.

If this is done, you can easily check if an enemy is being aggressive or not. This is jsut an example, there are other things you can do as well.

Obiously, you have to plan beforehand what value will do what, but I think this method is the best for making advanced AI.