Jump to content

youxianV

Member
  • Posts

    0
  • Joined

  • Last visited

Reputation Activity

  1. Wow
    youxianV reacted to ReneO93 in Seravy's A.I. Guide   
    What RicePigeon said. AILevel is such a blessing of a condition. You no longer have to put dumb commands at the top of a CMD file, and you can even make an AI behave differently depending on the difficulty setting.
     
    Here's another tutorial regarding guarding that I found.
    https://mugenmultiverse.forumotion.com/t7611-shirayuki33desu-s-way-to-make-your-mugen-character-s-a-i-block-guard-better
    https://archive.is/Eh9T7
    It's with winmugen in mind, but that just means to replace var(59) stuff with AILevel.
  2. Hmm
    youxianV reacted to RicePigeon in Seravy's A.I. Guide   
    Something that this guide never addresses is that using random in your AI triggers is bad coding practice. The reason for this for two reasons;
    Mugen processes states in top-down order, including the negative states (-3, -2, and -1) Random returns a different value every time it is called Take the following code into consideration:



     
    Looking at each AI changestate at face value, you would think that each one has a 30% chance at activating (random<300 roughly equates to 30% chance). However, because mugen processes states in top-down order, if the first changestate occurs, the second changestate will never process. Thus, the second changestate in actuality only has a 21% chance of occuring (70% chance of the 1st changestate not occuring, plus the 30% chance that the 2nd changestate will occur). When you have multiple AI changestates with similar or identical trigger conditions, you will need to account for this. A common way to do this (and much better practice) is to instead store the result of random into a variable, and compare the variable to different ranges of values in order to determine which changestate should occur.
×
×
  • Create New...