use this ai-trigger, it triggers as soon as any direction key is pushed by the
ai (in other words, as soon as the fight begins):
into cmd:
[Command]
name = "AI"
command = /$U
time = 1
[Command]
name = "AI"
command = /$D
time = 1
[Command]
name = "AI"
command = /$F
time = 1
[Command]
name = "AI"
command = /$B
time = 1
this also takes less unique commands than the other method
into cns:
[Statedef 9999]
type = S
movetype= I
physics = N
ctrl = 0
anim = 9999
velset = 0,0
sprpriority = -5
[State 9999, ParentVarSet 1]
type = ParentVarSet
trigger1 = (parent, RoundState=2)&&(parent, Command="AI")&&(Var(58)=0)
v = 59
value = 1
[State 9999, ParentVarSet 2]
type = ParentVarSet
trigger1 = (parent, Var(59)) && (parent, RoundState = 2)&&(Command="AI")&&(parent, Command = "AI")
v = 59
value = 0
[State 9999, VarSet 1]
type = VarSet
trigger1 = Var(58)
v = 58
value = 0
[State 9999, VarSet 2]
type = VarSet
trigger1 = Var(58)&&(parent, RoundState=2)&&(parent, Command="AI")
v = 58
value = 1
[State 9999, destroy self]
type = DestroySelf
trigger1= !roundstate||!(parent,roundstate)
and, of course, put something like this into statedef -2:
[state -2,ai-switch]
type = Helper
trigger1 = NumHelper(9999)=0
helpertype = Normal
name = ""
id = 9999
pos = 999,999
postype = p1
facing = 0
stateno = 9999
keyctrl = 1
ownpal = 1
supermovetime = 0
pausemovetime = 0