YesNoOk
avatar

AI vs Fake Get-Hit States. (Read 15832 times)

Started by Shadow97, March 29, 2018, 01:44:03 am
Share this topic:
AI vs Fake Get-Hit States.
#1  March 29, 2018, 01:44:03 am
  • avatar
  • *
    • Ukraine
I'm currently creating an AI for my character and I'm in a bit of a predicament.

I have my character use safe attacks, counters or dodges if the enemy is idle or attacking. If the enemy is hit, my char starts using unsafe stuff and hypers. All of that is until I put someone like Boss W.F. Kyo against him, and that Kyo uses an unfairly coded move that puts him in a get-hit state (in which he's still invulnerable) and spawns a projectile right where my char currently is. As a result, my character is fooled into trying an unsafe attack, gets hit by said projectile and eats a full combo.

Thus I need to distinguish between fake and real get-hit states. I came to a conclusion that I should use unsafe attacks only if the enemy is in state 5000 to 5099 or has been put in my custom state. But I can't seem to figure out how do I do the latter. The only and partial solution I've figured out so far is a numtarget && enemynear,id = target,id check, but that won't work if the enemy is hit and, in my case, since I also check the regular hitstates, sent into a custom state by a helper (and I have attacks that do just that).
Re: AI vs Fake Get-Hit States.
#2  March 29, 2018, 02:13:20 am
  • ****
  • Cute Bounty Hunter
You could also just not fight blatantly cheating opponents.
Re: AI vs Fake Get-Hit States.
#3  March 29, 2018, 08:39:43 am
  • avatar
  • *
    • Ukraine
You could also just not fight blatantly cheating opponents.

Well, thanks for the advice, but I want my AI to be able to beat at least this tier of characters (there's also Black Princess Touka in her twelfth palette...). Was it so easy to just abandon the idea, I wouldn't start the thread whatsoever.

Anyway, I found a solution that doesn't do exactly what I asked for, but still fulfills the general purpose: I set a variable to a certain value each time either my attack, projectile or helper hits the enemy (which I check via enemynear,id = target,id) and reset it the moment enemy's movetype becomes something other than H. That way not only do I know if it's me who triggered the get-hit state, but I also know what move triggered it, and can react accordingly.
Last Edit: March 29, 2018, 09:18:01 am by Shadow97
Re: AI vs Fake Get-Hit States.
#4  March 29, 2018, 10:34:51 am
  • *****
  • Shame on you!
    • USA
You can adjust your character for each cheap character. Something like
triggerall= numenemy
trigger1= enemynear,name="Boss W.F. Kyo" && enemynear,authorname="WhoEverMadeIt"
trigger1=enemynear,stateno=6666
To change to a guard state. Obviously you'd want to change the values to what they need to be.
vVv Ryuko718 Updated 10/31/22 vVv