Started by RagingRowen, October 25, 2020, 01:44:14 PM

#### RagingRowen

##### AIs that adhere to charge commands.
#1  October 25, 2020, 01:44:14 PM
• Release it god darn it!
I request these because the PotS or Infinite chars of the norm don't do so, as I've seen.

#### RagingRowen

##### Re: AIs that adhere to charge commands.
#2  April 07, 2021, 07:21:49 PM
• Release it god darn it!
Bump because I'm still curious. I think Kamekaze uses a time limit system of sorts.

#### NotAGoodName

##### Re: AIs that adhere to charge commands.
#3  April 08, 2021, 01:49:32 AM
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 = VarSettriggerall = (AILevel > 0)trigger1 = 1var(1) = IfElse((stateno = (41||42||100||299||819||799||399) && time = 0),0,(var(1) + 1))[state -2, AI nocheat]type = VarSettriggerall = (AILevel > 0)trigger1 = stateno = (0||20)var(1) = 0[state -2, AI Charged]type = VarSettriggerall = (AILevel > 0)trigger1 = 1var(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...