YesNoOk
avatar

ai 3 hit combo won't work. (Read 9628 times)

Started by mrgamer123, December 26, 2017, 10:04:31 pm
Share this topic:
ai 3 hit combo won't work.
#1  December 26, 2017, 10:04:31 pm
  • avatar
  • *
    • USA
I am trying to make a 3 hit combo for my ai but it just keeps spamming buttons.

here is my code:

[State -1, AI]
type = ChangeState
value = 200
triggerall = roundstate = 2
triggerall = var(59) = 1
triggerall = statetype != A
triggerall = random < 200
trigger1 = p2statetype != L
trigger1 = p2bodydist x = [0,40]
trigger1 = p2statetype != A
trigger1 = ctrl = 1
trigger2 = stateno = 210 && movehit
trigger3 = stateno = 400 && animtime = 0


[State -1, AI]
type = ChangeState
value = 210
triggerall = roundstate = 2
triggerall = statetype != A
triggerall = random < 200
trigger1 = p2statetype != L
trigger1 = p2bodydist x = [0,40]
trigger1 = p2statetype != A
trigger1 = ctrl = 1
trigger2 = stateno = 220 && movehit
trigger3 = stateno = 400 && animtime = 0

[State -1, AI]
type = ChangeState
value = 220
triggerall = roundstate = 2
triggerall = var(59) = 1
triggerall = statetype != A
triggerall = random < 500
trigger1 = p2statetype != L
trigger1 = p2bodydist x = [0,40]
trigger1 = p2statetype != A
trigger1 = ctrl = 1
Re: ai 3 hit combo won't work.
#2  December 26, 2017, 10:08:17 pm
  • *****
  • Estoy siempre listo para un desafío.
    • Puerto Rico
    • im41784@yahoo.com

  • Online
Is 210 supposed to combo into 200?

210 should have a trigger from 200
220 should have a trigger from 210

220 HAS NO TRIGGERS probably why its not working
Re: ai 3 hit combo won't work.
#3  January 11, 2018, 11:14:59 am
  • avatar
  • *
    • Vietnam
Do not use movehit. Use movecontact.
Second add some Anim and Animelem trigger to make AI define that move correctly.
------Tremble Mortal and Despair. Doom has come to this world------
Re: ai 3 hit combo won't work.
#4  January 11, 2018, 12:14:48 pm
  • **
    • Italy
To make sure that when 220 or 400 hits AI strikes a 210 instead of spamming buttons, you have to work on the moves that get spammed, rather than the move you want to chain.

The problem is not: "why doesn't strike with 210 after 220 or 400 hits?"
The problem is: "why it strikes with 410 or 221 instead of 210?"

-

I'm trying to develop a method for an AI that suffers from fear, panic, rage, up to now i devised some guidelines, but i have yet to think about how to get over the paradox of a character becoming too much predictable if his reaction is too rational.

-What i'm saying now doesn't work properly on characters that run forward rather than hopping, i'm still working on a solution. In general this method still need a lot of work-

You can store a Fvar to let the AI know when the opponent gets control back and another one to let the AI know how far they will go

Then in state -2 you should add -1/60 at every tick to that FVar

Then in every attack you should set that Fvar with the values of *.hittime

Those 3 operation mean the computer always knows how much time has got before opponent gets ctrl back.

Then in every attack's CMD paragraph you should put a "snipe factor" in the trigger dedicated to AI's reaction, based on the time said move takes to connect.

Then, in state 10 you should put, for the AI a change that decides to crouch if opponent is blocking high, then AI can choose an attack that must be blocked low. You can override state 10 from common

In airborne, overhead and mid attacks you should put a chance if opponent is blocking low.

On heavy air attacks,
When your character is landing upon an opponent (state between 40 and 49) and opponent is walking back, roll a random to remove ctrl from AI, so will land, discard attacks that are blocked high and choose between attacks that must be guarded while crouching and throws or unblockables.
Re: ai 3 hit combo won't work.
#5  January 11, 2018, 02:59:34 pm
  • *****
  • Estoy siempre listo para un desafío.
    • Puerto Rico
    • im41784@yahoo.com

  • Online
Its too easy, if he do the triggers correctly like I said
it would work.  Its how my Ryu does his combos
For his MP, HP, HK attack.
Re: ai 3 hit combo won't work.
#6  January 11, 2018, 10:18:01 pm
  • **
    • Italy
well, there are many ways, however if character AI has got signature combos, the best way may be to work on the CNS of the move, with a changestate that goes in the next instead of stby (0;10, inversion) if triggered.

However, to control the moves of an AI i think it would help to forbid each move untill it is decided how the AI will use it

Like:

[State -1, Jacknife kick]
type = ChangeState
value = 300
triggerall = roundstate = 2
triggerall = statetype = S
triggerall = ctrl
;For the human
Trigger1 = AiLevel = 0 ;  var(59) = 0
trigger1 = Command = "A"
;For AI
Trigger2 = AiLevel > 0 ;  var(59) = 1
Trigger2 = 0 ; No, Nein, Nyet, Bu!

When it is decided what AI should do with that move, including random use, then the computer is allowed to use it.

Re: ai 3 hit combo won't work.
#7  January 13, 2018, 12:53:56 pm
  • *

I think the order of your cmd is wrong
Put a 220 first to trigger on 210' movecontact (with target and do a check if p2 is still on movetype H)
Then a 210 on 200' movecontact (same) (i add the id in case char hit a helper or something weird )

So it goes like
220 if 210 made it
210 if 200 made it
200

Since its AI u can then have different triggers for the 210/220 outside a combo
Re: ai 3 hit combo won't work.
#8  January 13, 2018, 08:15:16 pm
  • ****
  • Frankenspriting is fun!!
    • Peru
Thought I'd throw this in there just in case: comment the random < 200 triggeralls out until you're sure the combo is working. No reason to sit and wait for the 20% chance to happen. ;)
Millie, "Ozy and Millie" said:
"I think there are really three types of people: "Glass is half-full" sorts of people, "Glass is half-empty" sorts of people,
and people who will spit into the glass until that's fixed."