Hi everyone.
I'm currently overhauling my character's AI and right now I'm trying to have my AI perform his autocombo (performed by the human player by mashing X) but so far I'm struggling to get it right.
This is how the coding currently is like.
;Combo 1
[State 205, autocombo 4]
type = ChangeState
triggerall = AILevel
triggerall = ctrl
triggerall = roundstate = 2
triggerall = statetype = S
triggerall = movetype != H
triggerall = p2bodydist y > -10
triggerall = p2statetype != L
triggerall = stateno = 204
triggerall = movecontact
trigger1 = p2bodydist x = [0,50]
value = 205
[State 204, autocombo 3]
type = ChangeState
triggerall = AILevel
triggerall = ctrl
triggerall = roundstate = 2
triggerall = movetype != H
triggerall = statetype = S
triggerall = p2bodydist y > -10
triggerall = p2statetype != L
trigger1 = stateno = 203
trigger1 = movecontact
value = 204
[State 203, autocombo 2]
type = ChangeState
triggerall = AILevel
triggerall = ctrl
triggerall = roundstate = 2
triggerall = statetype = S
triggerall = p2bodydist y > -10
triggerall = p2statetype != L
trigger1 = stateno = 200
trigger1 = movecontact
value = 203
[State 200, autocombo 1]
type = ChangeState
triggerall = AILevel
triggerall = ctrl
triggerall = roundstate = 2
triggerall = statetype = S
triggerall = p2statetype != L
triggerall = p2bodydist y > -10
trigger1 = random < ailevel * 4
trigger1 = stateno = 200
trigger2 = p2bodydist x < 50
value = 200
And in most cases it only makes my character use his light punch, without ever continuing with the other parts of the combo.
The closest I got to its intended effect is by erasing all triggerall = ctrl from the states, however this has the side effect of allowing him to combo out of hitstun.
Is there another way to get this done?