Posted by ijkorn
in [Doubt] About AI (Started by ijkorn May 09, 2018, 01:17:37 am
Board: M.U.G.E.N Development Help
Board: M.U.G.E.N Development Help
[State -1, super kick]
type = ChangeState
value = 3200
triggerall = p2bodydist X < 10
trigger1 = command = "fatal1"
triggerall = p2stateno = 9010
triggerall = statetype = S||statetype = C
triggerall = ctrl = 1||stateno = [10,12]
trigger1 = command != "run"
trigger1 = var(50) = 0
trigger2 = enemy,time > 60
trigger2 = var(50) = 1 && random%40 < AILevel&& AILevel > 1+random%2
;p1 command x
[Statedef 3100]
type = S
movetype= A
physics = S
juggle = 1
velset = 0,0
ctrl = 0
[State 430, 31]
type = changeanim
trigger1 = command = "x" ;Time < 30
value = anim
elem = animelemno(0)
[State 430, 31]
type = changeanim
trigger1 = command = "x" ;Time = 30
value = 3100
[State 9130, SetFatal]
type = Varset
trigger1 = 1
V = 4
value = 1
[State 3010, 1]
type = HitDef
trigger1 = !movecontact
attr = S, HA
hitflag = MAF
priority = 7
sparkno = -1
hitsound = 5,21
p2stateno = 3101
p2facing = 1
envshake.ampl = 8
envshake.time = 50
envshake.freq = 70
[State 430, 31]
type = playsnd
trigger1 = movecontact
value = 30, 5
volumescale = 200
persistent = 0
[State 3000, 2]
type = targetbind
trigger1 = movecontact
pos = 100,0
time = 3
persistent = 0
[State 3000, 2]
type = Helper
trigger1 = movecontact = 2
pos = 0,-90
postype = P2
stateno = 7440
persistent = 0
[State 3000, 2]
type = Helper
trigger1 = movecontact = 2
pos = 0,-80
postype = P2
stateno = 7450
persistent = 0
[State 430, 31]
type = changeanim
trigger1 = movecontact = 150
value = 3101
[State 3000, 3]
type = selfState
trigger1 = anim = 3101 && AnimTime = 0
value = 0
ctrl = 1
;*************************
;p1 command b
[State 430, 31]
type = changeanim
trigger1 = command = "b" ;Time < 30
value = anim
elem = animelemno(0)
[State 430, 31]
type = changeanim
trigger1 = command = "b" ;Time = 30
value = 7782
[State 9130, SetFatal]
type = Varset
trigger1 = 1
V = 4
value = 1
[State 3010, 2]
type = HitDef
trigger1 = !movecontact
attr = S, HA
hitflag = MAF
priority = 7
sparkno = -1
hitsound = 5,21
p2stateno = 3102
p2facing = 1
envshake.ampl = 8
envshake.time = 50
envshake.freq = 70
[State 430, 31]
type = playsnd
trigger1 = movecontact
value = 30, 5
volumescale = 200
persistent = 0
[State 3000, 2]
type = targetbind
trigger1 = movecontact
pos = 100,0
time = 3
persistent = 0
[State 3000, 2]
type = Helper
trigger1 = movecontact = 2
pos = 0,-90
postype = P2
stateno = 7440
persistent = 0
[State 3000, 2]
type = Helper
trigger1 = movecontact = 2
pos = 0,-80
postype = P2
stateno = 7450
persistent = 0
[State 430, 31]
type = changeanim
trigger1 = movecontact = 150
value = 7783
[State 3000, 3]
type = selfState
trigger1 = anim = 7783 && AnimTime = 0
value = 0
ctrl = 1
;*************************
;p2 command x
[Statedef 3101];p2
type = S
movetype= H
physics = N
juggle = 1
velset = 0,0
anim = 888
sprpriority = 2
ctrl = 0
facep2 = 1
[State 430, 31]
type = playsnd
trigger1 = time = 3
value = 3,0 + 2*(random%2)
channel = 3
[State 0, Explod]
type = Explod
trigger1 = time = 0
id = 640
anim = 5812
scale = const(size.xscale), const(size.yscale)
removetime = -1
sprpriority = 2
[State 0, Explod]
type = Explod
trigger1 = time = 10
anim = 43051
scale = const(size.xscale), const(size.yscale)
pos = 0,-140
bindtime = 1
vel = 0,0
accel = 0,0.4
removetime = -1
sprpriority = 2
[State 430, 31]
type = playsnd
trigger1 = time%19 = 0 && time < 100
value = f5,152
volumescale = 90
;********************************************************
;p2 command b
[State 3102]
type = RemoveExplod
trigger1 = time = 1
id = 640
[Statedef 3101];p2
type = S
movetype= H
physics = N
juggle = 1
velset = 0,0
anim = 888
sprpriority = 2
ctrl = 0
facep2 = 1
[State 430, 31]
type = playsnd
trigger1 = time = 3
value = 3,0 + 2*(random%2)
channel = 3
[State 0, Explod]
type = Explod
trigger1 = time = 0
anim = 5812
scale = const(size.xscale), const(size.yscale)
removetime = -1
sprpriority = 2
[State 0, Explod]
type = Explod
trigger1 = time = 10
anim = 43051
scale = const(size.xscale), const(size.yscale)
pos = 0,-140
bindtime = 1
vel = 0,0
accel = 0,0.4
removetime = -1
sprpriority = 2
[State 0, RemoveExplod]
type = RemoveExplod
trigger1 = command = "b"
[State 430, 31]
type = playsnd
trigger1 = time%19 = 0 && time < 100
value = f5,152
volumescale = 90
[State 430, 32]
type = changeanim
trigger1 = anim = 3101 & command = "b"
value = anim
elem = animelemno(0)
[State 430, 32]
type = changeanim
trigger1 = anim = 3101 & command = "b"
value = 7782
[State 867033, 3] ;this is what I want to happen againts the 2 player (enemy)
type = lifeadd
trigger1 = anim = 7782
value = -9999