YesNoOk
avatar

AIs that adhere to charge commands. (Read 2285 times)

Started by RagingRowen, October 25, 2020, 01:44:14 pm
AIs that adhere to charge commands.
#1  October 25, 2020, 01:44:14 pm
  • *****
  • Formerly known as HyperClawManiac
  • Competitive MUGEN when?
    • UK
    • sites.google.com/view/ragingrowen/home
I request these because the PotS or Infinite chars of the norm don't do so, as I've seen.
WIP Schedule:
The next Street Fighter All-Stars update
Re: AIs that adhere to charge commands.
#2  April 07, 2021, 07:21:49 pm
  • *****
  • Formerly known as HyperClawManiac
  • Competitive MUGEN when?
    • UK
    • sites.google.com/view/ragingrowen/home
Bump because I'm still curious. I think Kamekaze uses a time limit system of sorts.
WIP Schedule:
The next Street Fighter All-Stars update
Re: AIs that adhere to charge commands.
#3  April 08, 2021, 01:49:32 am
  • avatar
  • **
    • USA
So, this probably isn't what you're looking because I'm a nobody that makes one crappy character every 2 or 3 years, but I actually did this a couple of times.

Code:
[Statedef -2]
[state -2, AI Charging]
type = VarSet
triggerall = (AILevel > 0)
trigger1 = 1
var(1) = IfElse((stateno = (41||42||100||299||819||799||399) && time = 0),0,(var(1) + 1))

[state -2, AI nocheat]
type = VarSet
triggerall = (AILevel > 0)
trigger1 = stateno = (0||20)
var(1) = 0

[state -2, AI Charged]
type = VarSet
triggerall = (AILevel > 0)
trigger1 = 1
var(2) = IfElse((var(1) >= 45),1,0)

So the first SCTRL checks if I enter a state that I can't enter from charging.  If I do so, reset the time check to 0.  Otherwise, add 1 to the variable per tick.  Second SCTRL just straight up makes the variable 0 if I'm standing still or walking forward.  Then, I set another variable to 1 when my timer reaches 45 because I'm lazy and a garbage programmer.  (I think my plan was to generalize this technique in case I ever made a character with multiple charge times.)

With the right triggers in my AI, this (more or less) forces the AI to emulate charging behavior.  Pretty basic, and I never observed my AI cheating.  Might do some frame perfect BS here and there, but super low tier beatemup characters need all the help they can get...