AI Coding Tutorial

Started by Romeotantan, November 17, 2009, 12:13:32 AM

Previous topic - Next topic

GoldingCircle

"GrayCircle will surpass ever hero one day!"

My Local Name: Fighting Toys Freak.

Cyanide

That doesn't deserve any response other than read the docs.


In M.U.G.E.N there is no magic button

They say a little knowledge is a dangerous thing, but it's not one half so bad as a lot of ignorance.

urboyfriend

any hints how to increase the guard chance of ai?

Seravy

First, add this :
[State -1]
Type=Changestate
Triggerall=Ingurddist
Triggerall=var(59)>0
Triggerall=ctrl
Trigger1 = random< (var(50)*2+(AiLevel>=3)*30)
value=120

[State -1]
Type=Assertspecial
Triggerall=StateNo!=[120,160]
Trigger1=var(59)>0
flag=noairguard
flag2=nocrouchguard
flag3=nostandguard


(Where var(59) is the AI on/off variable and the random line decides how quickly/often it'll guard.)
Then add !inguarddist triggers to most attacks moves (except the fastest ones) to make sure your AI is not starting to use slower attacks while being attacked, giving the guarding more chance to trigger.
Additionally, you'll need to edit all your common guard states to make sure the AI is not stopping guarding too early.

My complete detailed AI guide (based on AIlevel, including guarding) is here : http://elecbyte.com/wiki/index.php/AI#Guarding