YesNoOk
avatar

AI Coding Tutorial (Read 17535 times)

Started by Romeotantan, November 17, 2009, 12:13:32 am
Share this topic:
Re: AI Coding Tutorial
#21  July 12, 2011, 04:00:54 pm
  • **
  • "GrayCircle will once be the greatest warrior"
    • i.imgur.com/MdGQY.gif
What about AILevel?
"GrayCircle will surpass ever hero one day!"

My Local Name: Fighting Toys Freak.
Re: AI Coding Tutorial
#22  July 13, 2011, 12:41:15 am
  • ******
  • Legendary XIII
  • I am the eye of the storm to come!
    • New Zealand
    • network.mugenguild.com/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.
Re: AI Coding Tutorial
#23  October 02, 2011, 08:14:29 am
  • avatar
  • *
any hints how to increase the guard chance of ai?
Re: AI Coding Tutorial
#24  October 18, 2011, 12:04:03 am
  • ****
    • Hungary
    • seravy.x10.mx/Wordpress
First, add this :
Code:
[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