If you're talking about AI in Mugen 1.0 or above, I'd suggest looking at this: http://elecbyte.com/wiki/index.php/AI
I think this is what maximilianjenus is trying to say to you, though I'm not sure.
I'll give you another example via my Dan's AI that's trying to execute his Hard/Heavy version of his Gadoken.
[State -1, AI]
type = ChangeState
value = 1120
triggerall = Var(59) > 0 ;This is used when the AI is ON.
triggerall = Var(29) = 0 ;This is used for Guard Checking, which is made by Adamskie to start with, but I tweaked it to be
more efficient in my game. This is to make sure the AI can't act out of his guarding state immediately
after blocking an attack.
triggerall = NumProj = 0 ;This tells the AI that it can only shoot a fireball, if it doesn't own one on the map yet. This is to make
sure the AI can't spam his fireball constantly.
triggerall = StateType != A ;This tells you that the AI can't use this move in midair;
meaning that the AI has to be on the ground in order to use it.
trigger1 = P2BodyDist X <= 175 ;The AI has to be 175 or less pixels away from the nearest enemy. If left as "P2Dist X," the AI looks at
its axis point of 0,0 and the enemy's axis point of 0,0, and looks at the distance between the two. If it's
used as "P2BodyDist X," it's the same but the AI looks at the closest hurtboxes between theirs and the
enemy's instead.
trigger1 = EnemyNear, StateType != L ;The closest enemy is NOT lying down.
trigger1 = EnemyNear, MoveType != H ;The closest enemy is NOT hit yet.
trigger1 = Random < Var(50)*0.05 ;This represent the AI's reaction time. Variable 50 represents the the original value of it's reaction
time, but it depends on the level. Look at AI Activation on Mugen 1.0+ via the website above that I've
given you. Guide was made by Seravy. The AI's reaction time is 5% its ORIGINAL reaction time. Example,
I've set my AI to have its original reaction time to be a value of 32.83 (Yes, you can put in decimals.),
if the difficulty is set at 6; if the value is supposed to be 5% its original value, then the value will
become ~2, or 499 frames, or ~8.3 seconds. May not sound much, but this AI uses the move quite
often at Level 6, so don't catch yourself off-guard when it comes to frames and percentages.
trigger1 = Ctrl ;The AI has to be in full control of itself.
trigger2 = P2BodyDist X >= 200 ;The AI has to be 200 or more pixels away from the nearest enemy.
trigger2 = EnemyNear, NumProj > 0 && !InGuardDist ;The nearest enemy has at least a projectile on the field and the AI is NOT within guarding
distance with the projectile or the enemy itself. Look at "attack.dist" and "proj.attack.dist" on the
character's "Size" section of its cns file, to show how close their enemy has to be in order to go into
their guarding state.
trigger2 = Random < Var(50)*0.4 ;The AI's reaction time to use the move is 40% its original reaction time.
trigger2 = Ctrl ;The AI has to be in full control of itself.
I hope this website, along with this example, should explain everything about having better AI. I'm trying to make my AI to be similar to the ones in the SFA series, so good luck, me.