YesNoOk
avatar

How To Code Characters To Attack While Flying? (Read 5142 times)

Started by Ki$@1st456v, October 29, 2021, 05:48:09 pm
Share this topic:
How To Code Characters To Attack While Flying?
#1  October 29, 2021, 05:48:09 pm
  • avatar
  • **
    • USA
Hi, everyone! I was trying to code aerial attacks into my character Lilith while flying, but I am not sure how or what to add. I have asked this question before and got an answer but I could not get it to work and the answer was not informative. I have looked at some characters such as MVC2 Storm in order to get somewhat of an understanding on coding attacks into flight and I see that they put a changestate into the coding of the aerial attacks of these characters like this:

;Air Dash Up
[Statedef 112]
type    = A
physics = N
movetype = I
anim = 1100
ctrl = 0 + (0*(var(55):=1))
velset = 0,0
sprpriority = 3

[State 117, 1]
type = VelSet
trigger1 = time >= 1
x = 0
y = -9

[State 855, VarSet]
type = PosAdd
triggerall = var(15)
trigger1 = pos y < -170
y = 10

[State 111, 1]
type = VelSet
trigger1 = time >= 20
x = 0
y = 0

[State 112, 3]
type = CtrlSet
trigger1 = time = 5
value = 1

[State 117, 2] ;Prevent from turning
type = AssertSpecial
trigger1 = 1
flag = NoAutoTurn

[State 112, 4]
type = ChangeState
triggerall = !var(15)
trigger1 = time = 21
value = 1211
ctrl = 1

[State 112, 4]
type = ChangeState
triggerall = var(15)
trigger1 = time = 21
value = 1505
ctrl = 1

;-------------------------

; Star Flight
[StateDef 1505]
type = A
movetype = I
physics = N
ctrl = 0
anim = 0
velset = 0,0
sprpriority = 2

[State 855, Turn]
type = Turn
trigger1 = (enemy,pos x-pos x)*facing < -4

[State 855, VarSet]
type = VarSet
trigger1 = 1
var(8) = (command="holdfwd")|(command="holdback")*2|(command="holdup")*4|(command="holddown")*8

; ”͈͐§ŒÀ
[State 855, VarSet]
type = VarSet
trigger1 = pos y > -15
var(8) = var(8)&7

[State 855, VarSet]
type = VarSet
trigger1 = pos y < -160
var(8) = var(8)&11

[State 855, PosAdd]
type = PosAdd
trigger1 = pos y < -170
y = 10

; ‘¬“x
[State 855, VelSet]
type = VelSet
trigger1 = 1
x = 0
y = 0

[State 855, VelSet]
type = VelSet
trigger1 = var(8)&1
x = ifelse(var(8)&4||var(8)&4,4,6)

[State 855, VelSet]
type = VelSet
trigger1 = var(8)&2
x = ifelse(var(8)&4||var(8)&4,-4,-6)

[State 855, VelSet]
type = VelSet
trigger1 = var(8)&4
y = ifelse(var(8)&1||var(8)&5,-5,-5)

[State 855, VelSet]
type = VelSet
trigger1 = var(8)&8
y = ifelse(var(8)&1||var(8)&5,5,5)

[State 0, 2]
type = Helper
triggerall = anim = 0
trigger1 = NumHelper(7041) = 0
stateno = 7041
id = 7041

[State 0, 2]
type = Helper
triggerall = anim = 0
trigger1 = NumHelper(7042) = 0
stateno = 7042
id = 7042

[State 20]
type = Helper
triggerall = Anim = 20
trigger1 = NumHelper(7000) = 0
stateno = 7000
id = 7000


[State 20]
type = Helper
triggerall = Anim = 20
trigger1 = NumHelper(7001) = 0
stateno = 7001
id = 7001


[State 20]
type = Helper
triggerall = Anim = 21
trigger1 = NumHelper(7002) = 0
stateno = 7002
id = 7002


[State 20]
type = Helper
triggerall = Anim = 21
trigger1 = NumHelper(7003) = 0
stateno = 7003
id = 7003

[State 855, ChangeAnim]
type = ChangeAnim
trigger1 = anim != 0
trigger1 = command != "holdfwd" &&command != "holdback" && command != "holdup"  && command!="holddown"
value = 0

[State 855, ChangeAnim]
type = ChangeAnim
trigger1 = anim != 1100
trigger1 = command = "holdup"  && command!="holddown" && command!="holdfwd"  && command!="holdback"
value = 1100

[State 855, ChangeAnim]
type = ChangeAnim
trigger1 = anim != 1101
trigger1 = command = "holddown"  && command!="holdup" && command!="holdfwd"  && command!="holdback"
value = 1101

[State 855, ChangeAnim]
type = ChangeAnim
trigger1 = anim != 20
trigger1 = command = "holdfwd" && command!="holdup" && command!="holddown"  && command!="holdback"
value = 20

[State 855, ChangeAnim]
type = ChangeAnim
trigger1 = anim != 20
trigger1 = command = "holdfwd" && command="holdup" && !command="holddown"  && command!="holdback"
value = 20

[State 855, ChangeAnim]
type = ChangeAnim
trigger1 = anim != 20
trigger1 = command = "holdfwd" && !command="holdup" && command="holddown"  && command!="holdback"
value = 20

[State 855, ChangeAnim]
type = ChangeAnim
trigger1 = anim != 21
trigger1 = command = "holdback" && command!="holdup" && command!="holddown"  && command!="holdfwd"
value = 21

[State 855, ChangeAnim]
type = ChangeAnim
trigger1 = anim != 21
trigger1 = command = "holdback" && command="holdup" && command!="holddown"  && command!="holdfwd"
value = 21

[State 855, ChangeAnim]
type = ChangeAnim
trigger1 = anim != 21
trigger1 = command = "holdback" && command!="holdup" && command="holddown"  && command!="holdfwd"
value = 21

[State 855, ChangeState]
type = ChangeState
trigger1 = var(15) = 0
value = 1510

;-------------------------------------------------------------------

; Flight End
[StateDef 1510]
type = A
movetype = I
physics = A
ctrl = 0
anim = 48
velset = 0,0
sprpriority = 2

[State 856, VarSet]
type = VarSet
trigger1 = time = 0
var(15) = 0

;------------------------------------------------------------------------
With Magneto there is a section where there is a ChangeAnim that corresponds to a value with a command for Magneto to perform attacks in the air:

[Statedef 6000]     ;Flight
type = S
movetype = I
anim = 341
ctrl = 0
physics = A
sprpriority = 5

[State 6000, VarSet]
type = VarSet
trigger1 = Time = 9
v = 12    ;fv = 10
value = 12

[State 6000, VelAdd]
type = VelAdd
triggerall = command = "Flight"
triggerall = var(12) != 12
trigger1 = time = 0
;x = 0
y = -7.75

[State 6000, SelfState]
type = SelfState
trigger1 = AnimTime = 0
value = 6001
;anim =
;ctrl =
;ignorehitpause = 0
;persistent = 1

;-------------------------------------------------
[Statedef 6001]
Type = A
movetype = I
anim = 0
ctrl = 0
velset = 0,0

[State 6001, AssertSpecial]
type = AssertSpecial
trigger1 = 1
flag = NoWalk

[State 6001, Turn]
type = Turn
trigger1 = p2dist x < -3

[State 6001, VarSet]
type = VarSet
triggerall = command = "Flight"
trigger1 = Time = 0
v = 12    ;fv = 10
value = 0

[State 6001, ChangeState]
type = ChangeState
trigger1 = command = "Flight"
value = 50
ctrl = 0

[State 6001, Helper]  ;-----Cape
type = Helper
triggerall = Anim = 0
trigger1 = NumHelper(6000) = 0
helpertype = normal ;player
ID = 6000
stateno = 1
pos = -14,-9
postype = left    ;p2,front,back,left,right
facing = 1
keyctrl = 0
ownpal = 0
ignorehitpause = 1

[State 6001, VelSet]
type = VelSet
trigger1 = command != "holdfwd"
trigger1 = command != "holdback"
trigger2 = time = 0
x = 0

[State 6001, VelSet]
type = VelSet
trigger1 = command != "holdup"
trigger1 = command != "holddown"
trigger2 = time = 0
y = 0

[State 6001, 1]
type = VelSet
trigger1 = command = "holdfwd"
x = const(velocity.walk.fwd.x)*2

[State 6001, 2]
type = VelSet
trigger1 = command = "holdback"
x = const(velocity.walk.back.x)*1.8

[State 6001, 1]
type = VelSet
trigger1 = command = "holdup"
y = -3.5*1.5

[State 6001, 1]
type = VelSet
trigger1 = command = "holddown"
y = 3.5*1.5

[State 6001, PosSet]
type = PosSet
trigger1 = pos y >= -25
y = -25

[State 6001, PosSet]
type = PosSet
trigger1 = pos y <= -250
y = -250

;---- BASICS -------

[State 6001, 3]
type = ChangeAnim
triggerall = vel x > 0
trigger1 = Anim != 20 && Anim != 5
trigger2 = Anim = 5 && AnimTime = 0
value = 20

[State 6001, 4]
type = ChangeAnim
triggerall = vel x < 0
trigger1 = Anim != 21 && Anim != 5
trigger2 = Anim = 5 && AnimTime = 0
value = 21

[State 6001, 4]
type = ChangeAnim
triggerall = vel y < 0
trigger1 = command = "holdup"
trigger1 = command != "holdfwd"
trigger1 = command != "holdback"
trigger1 = command != "holddown"
trigger1 = anim != 341
value = 341

[State 6001, 4]
type = null;ChangeAnim
trigger1 = anim != 343
trigger1 = command = "holdup"
trigger1 = command = "holdfwd"
trigger1 = command != "holdback"
trigger1 = command != "holddown"
value = 343

[State 6001, 4]
type = ChangeAnim
triggerall = vel y > 0
trigger1 = command = "holddown"
trigger1 = command != "holdfwd"
trigger1 = command != "holdback"
trigger1 = command != "holdup"
trigger1 = anim != 342
value = 342

[State 0, ChangeAnim]
type = ChangeAnim
triggerall = anim != 0
trigger1 = command != "holdfwd"
trigger1 = command != "holdback"
trigger1 = command != "holddown"
trigger1 = command != "holdup"
value = 0

[State 6000, ChangeState]
type = ChangeState
trigger1 = Win
trigger2 = Lose
value = 50
ctrl = 0

;----- ATTACKS -----

[State 6001, ChangeAnim]
type = ChangeState
trigger1 = command = "x"
value = 6005

[State 6001, ChangeAnim]
type = ChangeState
trigger1 = command = "y"
value = 6006

[State 6001, ChangeAnim]
type = ChangeState
trigger1 = command = "z"
value = 6007

[State 6001, ChangeAnim]
type = ChangeState
trigger1 = command = "a"
value = 6008

[State 6001, ChangeAnim]
type = ChangeState
trigger1 = command = "b"
value = 600

[State 6001, ChangeAnim]
type = ChangeState
trigger1 = command = "c"
value = 6010

[State 6001, ChangeAnim]
type = ChangeState
trigger1 = command = "Metal Shard"
value = 6500

;----------------------------------------
[Statedef 6005]
type    = A
movetype= A
;physics = A
juggle  = 2
poweradd= 20
ctrl = 0
anim = 600

[State 6005, HitDef]
type = HitDef
trigger1 = Time = 0
attr = A,NA        ;SCA,NA,SA,HA,NP,SP,HP,NT,ST,HT
hitflag = MAF        ;HLAFD+-
guardflag = MA         ;HLA
animtype = light          ;light,medium,hard,back,up,diagup
air.animtype = light
priority = 4,Hit   ;Hit,Miss,Dodge
damage = 20,10
pausetime = 9,10
ground.hittime = 10
;pausetime = 0,0
sparkno = 0
guard.sparkno = 40
sparkxy = -15,-30
hitsound = 5,0
guardsound = 0,0
ground.type = High      ;Low,Trip,None
air.hittime = 20
ground.velocity = -2,0
;guard.velocity = 0
air.velocity = -2,-5
;airguard.velocity = 0,0
sprpriority = 1

[State 1010, VelSet]
type = VelSet
trigger1 =  Time = 0
x = 0
y = 0

[State 6005, SelfState]
type = SelfState
trigger1 = Animtime = 0
value = 6001

;--------------------------
[Statedef 6006]
type    = A
movetype= A
;physics = A
juggle  = 2
poweradd= 28
ctrl = 0
anim = 610

[State 1010, VelSet]
type = VelSet
trigger1 =  Time = 0
x = 0
y = 0

[State 610, HitDef]
type = HitDef
trigger1 = Time = 0
attr = A,NA        ;SCA,NA,SA,HA,NP,SP,HP,NT,ST,HT
hitflag = MAF        ;HLAFD+-
guardflag = MA         ;HLA
animtype = medium          ;light,medium,hard,back,up,diagup
air.animtype = medium
priority = 4,Hit   ;Hit,Miss,Dodge
damage = 30,0
pausetime = 10,8
ground.hittime = 10
sparkno = 1
guard.sparkno = 41
sparkxy = -10,-38
hitsound = 5,0
guardsound = 0,0
ground.type = High      ;Low,Trip,None
air.hittime = 20
ground.velocity = -5,0
;guard.velocity = 0
air.velocity = -.5,-3
;airguard.velocity = 0,0
sprpriority = 1

[State 610, PlaySnd]
type = PlaySnd
trigger1 = Time = 0
value = 1,1

[State 6005, SelfState]
type = SelfState
trigger1 = Animtime = 0
value = 6001

;-----------------------
[Statedef 6007]
type    = A
movetype= A
;physics = A
juggle  = 2
poweradd= 20
ctrl = 0
anim = 620

[State 1010, VelSet]
type = VelSet
trigger1 =  Time = 0
x = 0
y = 0

[State 620, HitDef]
type = HitDef
trigger1 = Time = 0
attr = S,NA        ;SCA,NA,SA,HA,NP,SP,HP,NT,ST,HT
hitflag = MAF        ;HLAFD+-
guardflag = MA         ;HLA
animtype = light          ;light,medium,hard,back,up,diagup
air.animtype = light
priority = 4,Hit   ;Hit,Miss,Dodge
damage = 30,0
ground.hittime = 10
pausetime = 10,7
sparkno = 2
guard.sparkno = 42
sparkxy = -14,-270
hitsound =5,0
guardsound = 0,0
ground.type = High      ;Low,Trip,None
air.hittime = 10
ground.velocity = 0,0
;guard.velocity = 0
air.velocity = 0,-1
;airguard.velocity = 0,0
sprpriority = 1

[State 6005, SelfState]
type = SelfState
trigger1 = Animtime = 0
value = 6001

;--------------------------
[Statedef 6008]
type    = A
movetype= A
;physics = A
juggle  = 2
poweradd= 20
ctrl = 0
anim = 630

[State 1010, VelSet]
type = VelSet
trigger1 =  Time = 0
x = 0
y = 0

[State 630, HitDef]
type = HitDef
trigger1 = Time = 0
attr = S,NA        ;SCA,NA,SA,HA,NP,SP,HP,NT,ST,HT
hitflag = MAF        ;HLAFD+-
guardflag = MA         ;HLA
animtype = light          ;light,medium,hard,back,up,diagup
air.animtype = light
priority = 4,Hit   ;Hit,Miss,Dodge
damage = 20,10
;hittime = 0,0
pausetime = 10,7
ground.hittime = 10
sparkno = 0
guard.sparkno = 40
sparkxy = 0,-60
hitsound =5,0
guardsound = 0,0
ground.type = High      ;Low,Trip,None
air.hittime = 20
ground.velocity = 0,0
;guard.velocity = 0
air.velocity = 0,-1
;airguard.velocity = 0,0
sprpriority = 1

[State 630, PosFreeze]
type = PosFreeze
triggerall = movehit
trigger1 = time = 0
value = 1

[State 630, PlaySnd]
type = PlaySnd
trigger1 = Time = 0
value = 1,1

[State 6005, SelfState]
type = SelfState
trigger1 = Animtime = 0
value = 6001

;----------------------------
[Statedef 6009]
type    = A
movetype= A
;physics = A
juggle  = 2
poweradd= 20
ctrl = 0
anim = 640

[State 1010, VelSet]
type = VelSet
trigger1 =  Time = 0
x = 0
y = 0

[State 640, HitDef]
type = HitDef
trigger1 = Time = 0
attr = S,NA        ;SCA,NA,SA,HA,NP,SP,HP,NT,ST,HT
hitflag = MAF        ;HLAFD+-
guardflag = MA         ;HLA
animtype = light          ;light,medium,hard,back,up,diagup
air.animtype = light
priority = 4,Hit   ;Hit,Miss,Dodge
damage = 30,0
ground.hittime = 10
pausetime = 10,7
sparkno = 1
guard.sparkno = 41
sparkxy = 0,-60
hitsound = 5,0
guardsound = 0,0
ground.type = High      ;Low,Trip,None
air.hittime = 20
ground.velocity = 0,0
;guard.velocity = 0
air.velocity = 0,-1
;airguard.velocity = 0,0
sprpriority = 1

[State 640, PosFreeze]
type = PosFreeze
triggerall = movehit
trigger1 = time = 0
value = 1

[State 640, PlaySnd]
type = PlaySnd
trigger1 = Time = 0
value = 1,2

[State 6005, SelfState]
type = SelfState
trigger1 = Animtime = 0
value = 6001

;----------------------------
[Statedef 6010]
type    = A
movetype= A
;physics = A
juggle  = 2
poweradd= 20
ctrl = 0
anim = 650

[State 1010, VelSet]
type = VelSet
trigger1 =  Time = 0
x = 0
y = 0

[State 650, HitDef]
type = HitDef
trigger1 = Time = 0
attr = S,NA        ;SCA,NA,SA,HA,NP,SP,HP,NT,ST,HT
hitflag = MAF        ;HLAFD+-
guardflag = MA         ;HLA
animtype = hard          ;light,medium,hard,back,up,diagup
air.animtype = hard
priority = 4,Hit   ;Hit,Miss,Dodge
damage = 40,19
ground.hittime = 10
pausetime = 3,5
air.pausetime = 0,0
sparkno = 2
guard.sparkno = 41
sparkxy = 0,0
hitsound = 5,0
guardsound = 0,0
ground.type = High      ;Low,Trip,None
air.hittime = 20
ground.velocity = -3,0
ground.dist = -5
;guard.velocity = 0
air.velocity = -8.2,6
air.dist = -10
;airguard.velocity = 0,0
sprpriority = 1

[State 650, ScreenBound]
type = null;ScreenBound
triggerall = movehit
trigger1 = 1
value = 1
movecamera = 1,1

[State 650, PosFreeze]
type = PosFreeze
triggerall = movehit
trigger1 = time = 0
value = 1

[State 650, PlaySnd]
type = PlaySnd
trigger1 = Time = 3
value = 1,3

[State 6005, SelfState]
type = SelfState
trigger1 = Animtime = 0
value = 6001
;----------------------------------------
;-----------------------------------------------------
[Statedef 6500] ;Metal Shard Super
type = A
Movetype = A
Anim = 3100
poweradd = -1000
ctrl = 0
velset = 0,0

[State 6500, Explod]
type = Explod
trigger1 = Time = 0
anim = 6010
pos = -190,0
postype = back  ;p2,front,back,left,right
;bindtime =
vel = 5,0
accel = -.1,0
removetime = 52
supermove = 1
supermovetime = 500
scale = 1,1.1
sprpriority = -3
ontop = 1
ownpal = 1

[State 6500, Explod]
type = Explod
trigger1 = Time = 0
anim = 6005
pos = -28,0
postype = back  ;p2,front,back,left,right
removetime = 52
supermove = 1
scale = 1,1.1
sprpriority = 0

[State 6500, Explod]
type = Explod
trigger1 = Time = 1
anim = 6006
pos = -0,0
postype = back  ;p2,front,back,left,right
removetime = 40
;supermove = 1
scale = 1,1.1
sprpriority = 0

[State 6500, SuperPause]
type = SuperPause
trigger1 = Time = 0
time = 30
anim = 4000
sound = S500, 0
pos = 7, -110
;move =
darken = 1
unhittable = 1

[State 6500, Helper]
type = Helper
trigger1 = GameTime%3 = 0
helpertype = normal ;player
name = "Shard"
ID = 2550
stateno = 2550
pos = 0,0
postype = back    ;p2,front,back,left,right
facing = 1

[State 6500]
type = ChangeState
trigger1 = AnimTime = 0
value = 6001
ctrl = 1
;---------------------------------------

I am not sure however what to add for my Lilith with the flight coding I have here. I have tried doing a ChangeAnim like in Magneto's code but that only made her do the beginning frame of her aerial attacks with no attack coming out. Here is her code here:

;---------------------------------------

[Statedef 40000]
type = A
movetype = I
physics = N
ctrl = 0
anim = 40000
velset = 0,-4
sprpriority = 2

[State 850, VarSet]
type = VarSet
trigger1 = time = 0
var(1) = 0

[State 200, PlaySnd]
type = PlaySnd
trigger1 = time = 0
value = 100,4
volume = 255
volumescale = 255

[State 850, VarSet]
type = VarSet
trigger1 = time = 0
var(21) = 460

[State 850, VelMul]
type = VelMul
trigger1 = 1
y = .92

[State 850, ChangeState]
type = ChangeState
trigger1 = animtime = 0
value = 40005
 
[Statedef 40001]
type = A
movetype = I
physics = N
ctrl = 0
anim = 40000
velset = 0,-4
sprpriority = 2

[State 200, PlaySnd]
type = PlaySnd
trigger1 = time = 0
value = 100,4
volume = 255
volumescale = 255

[State 851, VarSet]
type = VarSet
trigger1 = time = 0
var(1) = 0

[State 851, VarSet]
type = VarSet
trigger1 = time = 0
var(21) = 460

[State 851, VelMul]
type = VelMul
trigger1 = 1
y = .92

[State 851, ChangeState]
type = ChangeState
trigger1 = animtime = 0
value = 40005

[Statedef 40005]
type = A
movetype = I
physics = N
ctrl = 0
anim = 0
velset = 0,0
sprpriority = 2

[State 855, Turn]
type = Turn
trigger1 = (enemy,pos x-pos x)*facing < -4

[State 855, VarSet]
type = VarSet
trigger1 = 1
var(11) = (command="holdfwd")|(command="holdback")*2|(command="holdup")*4|(command="holddown")*8

; ”͈͐§ŒÀ
[State 855, VarSet]
type = VarSet
trigger1 = pos y > -15
var(11) = var(11)&7

[State 855, VarSet]
type = VarSet
trigger1 = pos y = -270
var(11) = var(11)&11

[State 855, PosAdd]
type = PosAdd
trigger1 = pos y = -270
y = 10

[State 855, PosSet]
type= PosSet
trigger1 = pos y =-270
y=-270
; ‘¬“x
[State 855, VelSet]
type = VelSet
trigger1 = 1
x = 0
y = 0

[State 855, VelSet]
type = VelSet
trigger1 = var(11)&1
x = ifelse(var(11)&4||var(11)&4,4,7)

[State 855, VelSet]
type = VelSet
trigger1 = var(11)&2
x = ifelse(var(11)&4||var(11)&4,-4,-7)

[State 855, VelSet]
type = VelSet
trigger1 = var(11)&4
y = ifelse(var(11)&1||var(11)&6,-6,-6)

[State 855, VelSet]
type = VelSet
trigger1 = var(11)&8
y = ifelse(var(11)&1||var(11)&6,6,6)

[State 200, PlaySnd]
type = PlaySnd
trigger1 = anim = 1347
value = 100,4
volume = 255
volumescale = 255
channel = 7
loop = 0
pan = 0
persistent = 0

[State 200, PlaySnd]
type = PlaySnd
trigger1 = anim = 1343
value = 100,4
volume = 255
volumescale = 255
channel = 7
loop = 0
pan = 0
persistent = 0

[State 200, PlaySnd]
type = PlaySnd
trigger1 = anim = 1345
value = 100,4
volume = 255
volumescale = 255
channel = 7
loop = 0
pan = 0
persistent = 0

[State 200, PlaySnd]
type = PlaySnd
trigger1 = anim = 1344
value = 100,4
volume = 255
volumescale = 255
channel = 7
loop = 0
pan = 0
persistent = 0

[State 200, PlaySnd]
type = PlaySnd
trigger1 = anim = 1346
value = 100,4
volume = 255
volumescale = 255
channel = 7
loop = 0
pan = 0
persistent = 0

[State 200, PlaySnd]
type = PlaySnd
trigger1 = anim = 1341
value = 100,4
volume = 255
volumescale = 255
channel = 7
loop = 0
pan = 0
persistent = 0

[State 200, PlaySnd]
type = PlaySnd
trigger1 = anim = 1340
value = 100,4
volume = 255
volumescale = 255
channel = 7
loop = 0
pan = 0
persistent = 0

[State 200, PlaySnd]
type = PlaySnd
trigger1 = anim = 1342
value = 100,4
volume = 255
volumescale = 255
channel = 7
loop = 0
pan = 0
persistent = 0

[State 200, PlaySnd]
type = PlaySnd
trigger1 = (enemy,pos x-pos x)*facing < -5
value = 100,4
volume = 255
volumescale = 255
channel = 1
loop = 0
pan = 0
persistent = 0

[State 855, ChangeAnim]
type = ChangeAnim
trigger1 = anim != 40005
trigger1 = command != "holdfwd" &&command != "holdback" && command != "holdup"  && command!="holddown"
value = 40005

[State 855, ChangeAnim]
type = ChangeAnim
trigger1 = anim != 40013
trigger1 = command = "holdup"  && command!="holddown" && command!="holdfwd"  && command!="holdback"
value = 40013

[State 855, ChangeAnim]
type = ChangeAnim
trigger1 = anim != 40017
trigger1 = command = "holddown"  && command!="holdup" && command!="holdfwd"  && command!="holdback"
value = 40017

[State 855, ChangeAnim]
type = ChangeAnim
trigger1 = anim != 40015
trigger1 = command = "holdfwd" && command!="holdup" && command!="holddown"  && command!="holdback"
value = 40015

[State 855, ChangeAnim]
type = ChangeAnim
trigger1 = anim != 40014
trigger1 = command = "holdfwd" && command="holdup" && !command="holddown"  && command!="holdback"
value = 40014

[State 855, ChangeAnim]
type = ChangeAnim
trigger1 = anim != 40016
trigger1 = command = "holdfwd" && !command="holdup" && command="holddown"  && command!="holdback"
value = 40016

[State 855, ChangeAnim]
type = ChangeAnim
trigger1 = anim != 40011
trigger1 = command = "holdback" && command!="holdup" && command!="holddown"  && command!="holdfwd"
value = 40011

[State 855, ChangeAnim]
type = ChangeAnim
trigger1 = anim != 40010
trigger1 = command = "holdback" && command="holdup" && command!="holddown"  && command!="holdfwd"
value = 40010

[State 855, ChangeAnim]
type = ChangeAnim
trigger1 = anim != 40012
trigger1 = command = "holdback" && command!="holdup" && command="holddown"  && command!="holdfwd"
value = 40012

[State 855, ChangeState]
type = ChangeState
trigger1 = var(21) = 0
value = 40006

[Statedef 40005]
type = A
movetype = I
physics = N
ctrl = 0
anim = 0
velset = 0,0
sprpriority = 2

[State 0, 2]
type = Helper
trigger1 = NumHelper(6009) = 0
stateno = 6009
id = 6009

[State 855, PosAdd]
type = PosAdd
trigger1 = pos y = -270
y = 10

[State 855, PosAdd]
type = PosAdd
trigger1 = pos y = -270
y = 10

[State 20, Turn]
type = Turn
trigger1 = (enemy,pos x-pos x)*facing < -5

[State 20, PosSet]
type = PosSet
trigger1= pos y =-270
y =-270

[State 20, VelSet]
type = VelSet
trigger1 = 1
x = 0
y = 0

[State 20, VelSet]
type = VelSet
trigger1 = command = "holdfwd"
x = ifelse(command!="holdup"&&command!="holddown",1,1)

[State 20, VelSet]
type = VelSet
trigger1 = command = "holdback"
x = ifelse(command!="holdup"&&command!="holddown",-1,-1)

[State 20, VelSet]
type = VelSet
trigger1 = command = "holdup"
y = ifelse(command!="holdfwd"&&command!="holdback",-1,-1)

[State 20, VelSet]
type = VelSet
trigger1 = command = "holddown"
y = ifelse(command!="holdfwd"&&command!="holdback",1,1)

[State 855, ChangeAnim]
type = ChangeAnim
trigger1 = anim != 0
trigger1 = command != "holdfwd" &&command != "holdback" && command != "holdup"
value = 0

[State 855, ChangeAnim]
type = ChangeAnim
trigger1 = anim != 40006
trigger1 = command = "holdup"
value = 40006

[State 855, ChangeAnim]
type = ChangeAnim
trigger1 = anim != 40005
trigger1 = command = "holddown"
value = 40005

[State 855, ChangeAnim]
type = ChangeAnim
trigger1 = anim != 40001
trigger1 = command = "holdfwd" && command!="holdup" && command!="holddown"
value = 40001

[State 855, ChangeAnim]
type = ChangeAnim
trigger1 = anim != 40007
trigger1 = command = "holdfwd" && command="holdup" && !command="holddown"
value = 40007

[State 855, ChangeAnim]
type = ChangeAnim
trigger1 = anim != 40004
trigger1 = command = "holdfwd" && !command="holdup" && command="holddown"
value = 40004

[State 855, ChangeAnim]
type = ChangeAnim
trigger1 = anim != 40002
trigger1 = command = "holdback" && command!="holdup" && command!="holddown"
value = 40002

[State 855, ChangeAnim]
type = ChangeAnim
trigger1 = anim != 40008
trigger1 = command = "holdback" && command="holdup" && command!="holddown"
value = 40008

[State 855, ChangeAnim]
type = ChangeAnim
trigger1 = anim != 40009
trigger1 = command = "holdback" && command!="holdup" && command="holddown"
value = 40009

[State 855, ChangeState]
type = ChangeState
trigger1 = var(21) = 0
value = 40006
 
[Statedef 40006]
type = A
movetype = I
physics = A
ctrl = 0
anim = 57
velset = 0,0
sprpriority = 2

[State 856, VarSet]
type = VarSet
trigger1 = time = 0
var(21) = 0
;------------------------------------------------------------------------------------------------------------

What must I add to make Lilith able to attack during flight? I appreciate any help anyone can give on this subject.
Re: How To Code Characters To Attack While Flying?
#2  November 01, 2021, 03:32:50 am
  • ******
  • Legendary XIII
  • I am the eye of the storm to come!
    • New Zealand
    • network.mugenguild.com/cyanide/
Depends on if the air attacks are just ground attacks again or air versions. We can make a quick and simple broken one just by adding a stateno = flight state to the cmd for any attafk you want to work while flying. Ctrl triggers may need changing but thats the simplest method. Then you can fix stuff up after that. Its how dbz characters did it back in the day.


In M.U.G.E.N there is no magic button

They say a little knowledge is a dangerous thing, but it's not one half so bad as a lot of ignorance.
Re: How To Code Characters To Attack While Flying?
#3  November 01, 2021, 07:12:30 am
  • avatar
  • **
    • USA
Okay. I see a general idea of what you are saying. Would that look like this?

I have included it in the changeanim section of the 40005 statedefs, differently from that section above

[Statedef 40005]
type = A
movetype = I
physics = N
ctrl = 0
anim = 0
velset = 0,0
sprpriority = 2

[State 855, Turn]
type = Turn
trigger1 = (enemy,pos x-pos x)*facing < -4

[State 855, VarSet]
type = VarSet
trigger1 = 1
var(11) = (command="holdfwd")|(command="holdback")*2|(command="holdup")*4|(command="holddown")*8

; ”͈͐§ŒÀ
[State 855, VarSet]
type = VarSet
trigger1 = pos y > -15
var(11) = var(11)&7

[State 855, VarSet]
type = VarSet
trigger1 = pos y = -270
var(11) = var(11)&11

[State 855, PosAdd]
type = PosAdd
trigger1 = pos y = -270
y = 10

[State 855, PosSet]
type= PosSet
trigger1 = pos y =-270
y=-270
; ‘¬“x
[State 855, VelSet]
type = VelSet
trigger1 = 1
x = 0
y = 0

[State 855, VelSet]
type = VelSet
trigger1 = var(11)&1
x = ifelse(var(11)&4||var(11)&4,4,7)

[State 855, VelSet]
type = VelSet
trigger1 = var(11)&2
x = ifelse(var(11)&4||var(11)&4,-4,-7)

[State 855, VelSet]
type = VelSet
trigger1 = var(11)&4
y = ifelse(var(11)&1||var(11)&6,-6,-6)

[State 855, VelSet]
type = VelSet
trigger1 = var(11)&8
y = ifelse(var(11)&1||var(11)&6,6,6)

[State 200, PlaySnd]
type = PlaySnd
trigger1 = anim = 1347
value = 100,4
volume = 255
volumescale = 255
channel = 7
loop = 0
pan = 0
persistent = 0

[State 200, PlaySnd]
type = PlaySnd
trigger1 = anim = 1343
value = 100,4
volume = 255
volumescale = 255
channel = 7
loop = 0
pan = 0
persistent = 0

[State 200, PlaySnd]
type = PlaySnd
trigger1 = anim = 1345
value = 100,4
volume = 255
volumescale = 255
channel = 7
loop = 0
pan = 0
persistent = 0

[State 200, PlaySnd]
type = PlaySnd
trigger1 = anim = 1344
value = 100,4
volume = 255
volumescale = 255
channel = 7
loop = 0
pan = 0
persistent = 0

[State 200, PlaySnd]
type = PlaySnd
trigger1 = anim = 1346
value = 100,4
volume = 255
volumescale = 255
channel = 7
loop = 0
pan = 0
persistent = 0

[State 200, PlaySnd]
type = PlaySnd
trigger1 = anim = 1341
value = 100,4
volume = 255
volumescale = 255
channel = 7
loop = 0
pan = 0
persistent = 0

[State 200, PlaySnd]
type = PlaySnd
trigger1 = anim = 1340
value = 100,4
volume = 255
volumescale = 255
channel = 7
loop = 0
pan = 0
persistent = 0

[State 200, PlaySnd]
type = PlaySnd
trigger1 = anim = 1342
value = 100,4
volume = 255
volumescale = 255
channel = 7
loop = 0
pan = 0
persistent = 0

[State 200, PlaySnd]
type = PlaySnd
trigger1 = (enemy,pos x-pos x)*facing < -5
value = 100,4
volume = 255
volumescale = 255
channel = 1
loop = 0
pan = 0
persistent = 0

[State 855, ChangeAnim]
type = ChangeAnim
trigger1 = anim != 40005
trigger1 = command != "holdfwd" &&command != "holdback" && command != "holdup"  && command!="holddown"
value = 40005

[State 855, ChangeAnim]
type = ChangeAnim
trigger1 = anim != 40013
trigger1 = command = "holdup"  && command!="holddown" && command!="holdfwd"  && command!="holdback"
value = 40013

[State 855, ChangeAnim]
type = ChangeAnim
trigger1 = anim != 40017
trigger1 = command = "holddown"  && command!="holdup" && command!="holdfwd"  && command!="holdback"
value = 40017

[State 855, ChangeAnim]
type = ChangeAnim
trigger1 = anim != 40015
trigger1 = command = "holdfwd" && command!="holdup" && command!="holddown"  && command!="holdback"
value = 40015

[State 855, ChangeAnim]
type = ChangeAnim
trigger1 = anim != 40014
trigger1 = command = "holdfwd" && command="holdup" && !command="holddown"  && command!="holdback"
value = 40014

[State 855, ChangeAnim]
type = ChangeAnim
trigger1 = anim != 40016
trigger1 = command = "holdfwd" && !command="holdup" && command="holddown"  && command!="holdback"
value = 40016

[State 855, ChangeAnim]
type = ChangeAnim
trigger1 = anim != 40011
trigger1 = command = "holdback" && command!="holdup" && command!="holddown"  && command!="holdfwd"
value = 40011

[State 855, ChangeAnim]
type = ChangeAnim
trigger1 = anim != 40010
trigger1 = command = "holdback" && command="holdup" && command!="holddown"  && command!="holdfwd"
value = 40010

[State 855, ChangeAnim]
type = ChangeAnim
trigger1 = anim != 40012
trigger1 = command = "holdback" && command!="holdup" && command="holddown"  && command!="holdfwd"
value = 40012

[State 855, ChangeAnim]
type = ChangeAnim
trigger1 = anim != 40023
trigger1 = command = "x"
value = 40023

[State 855, ChangeAnim]
type = ChangeAnim
trigger1 = anim != 40024
trigger1 = command = "y"
value = 40024

[State 855, ChangeState]
type = ChangeState
trigger1 = var(21) = 0
value = 40006

[Statedef 40005]
type = A
movetype = I
physics = N
ctrl = 0
anim = 0
velset = 0,0
sprpriority = 2

[State 0, 2]
type = Helper
trigger1 = NumHelper(6009) = 0
stateno = 6009
id = 6009

[State 855, PosAdd]
type = PosAdd
trigger1 = pos y = -270
y = 10

[State 855, PosAdd]
type = PosAdd
trigger1 = pos y = -270
y = 10

[State 20, Turn]
type = Turn
trigger1 = (enemy,pos x-pos x)*facing < -5

[State 20, PosSet]
type = PosSet
trigger1= pos y =-270
y =-270

[State 20, VelSet]
type = VelSet
trigger1 = 1
x = 0
y = 0

[State 20, VelSet]
type = VelSet
trigger1 = command = "holdfwd"
x = ifelse(command!="holdup"&&command!="holddown",1,1)

[State 20, VelSet]
type = VelSet
trigger1 = command = "holdback"
x = ifelse(command!="holdup"&&command!="holddown",-1,-1)

[State 20, VelSet]
type = VelSet
trigger1 = command = "holdup"
y = ifelse(command!="holdfwd"&&command!="holdback",-1,-1)

[State 20, VelSet]
type = VelSet
trigger1 = command = "holddown"
y = ifelse(command!="holdfwd"&&command!="holdback",1,1)

[State 855, ChangeAnim]
type = ChangeAnim
trigger1 = anim != 0
trigger1 = command != "holdfwd" &&command != "holdback" && command != "holdup"
value = 0

[State 855, ChangeAnim]
type = ChangeAnim
trigger1 = anim != 40006
trigger1 = command = "holdup"
value = 40006

[State 855, ChangeAnim]
type = ChangeAnim
trigger1 = anim != 40005
trigger1 = command = "holddown"
value = 40005

[State 855, ChangeAnim]
type = ChangeAnim
trigger1 = anim != 40001
trigger1 = command = "holdfwd" && command!="holdup" && command!="holddown"
value = 40001

[State 855, ChangeAnim]
type = ChangeAnim
trigger1 = anim != 40007
trigger1 = command = "holdfwd" && command="holdup" && !command="holddown"
value = 40007

[State 855, ChangeAnim]
type = ChangeAnim
trigger1 = anim != 40004
trigger1 = command = "holdfwd" && !command="holdup" && command="holddown"
value = 40004

[State 855, ChangeAnim]
type = ChangeAnim
trigger1 = anim != 40002
trigger1 = command = "holdback" && command!="holdup" && command!="holddown"
value = 40002

[State 855, ChangeAnim]
type = ChangeAnim
trigger1 = anim != 40008
trigger1 = command = "holdback" && command="holdup" && command!="holddown"
value = 40008

[State 855, ChangeAnim]
type = ChangeAnim
trigger1 = anim != 40009
trigger1 = command = "holdback" && command!="holdup" && command="holddown"
value = 40009

[State 855, ChangeAnim]
type = ChangeAnim
trigger1 = anim != 40023
trigger1 = command = "x"
value = 40023

[State 855, ChangeAnim]
type = ChangeAnim
trigger1 = anim != 40024
trigger1 = command = "y"
value = 40024

[State 855, ChangeState]
type = ChangeState
trigger1 = var(21) = 0
value = 40006
 
 
Re: How To Code Characters To Attack While Flying?
#4  November 01, 2021, 11:14:12 am
  • ******
  • Legendary XIII
  • I am the eye of the storm to come!
    • New Zealand
    • network.mugenguild.com/cyanide/
No you do it all from the cmd. Rather than ctrl or statetype you just trigger all your normal attacks from stateno = flight. Doing it all from within the cns is a bit mad.


In M.U.G.E.N there is no magic button

They say a little knowledge is a dangerous thing, but it's not one half so bad as a lot of ignorance.
Re: How To Code Characters To Attack While Flying?
#5  November 01, 2021, 06:05:47 pm
  • avatar
  • **
    • USA
I apologize, but I have never seen what that looks like without adding it in the cns. In all the examples I have seen they reference some code in the cns. I took a look at some flight cmd entries with REDHOT's Storm and I noticed that Storms flight as a stateno is included in the aerial attacks like this

[State -1, Air Punch]
type = ChangeState
value = 600
triggerall = !var(59)
triggerall = command = "x"
trigger1 = statetype = A  && (ctrl || stateno = 1505)

;---------------------------------------------------------------------------
[State -1, Air Kick]
type = ChangeState
value = 700
triggerall = !var(59)
triggerall = command = "a"
trigger1 = statetype = A  && (ctrl || stateno = 1505)
trigger2 = stateno = 600 && movecontact

;---------------------------------------------------------------------------
[State -1, Air Medium Punch 3]
type = ChangeState
value = 614
triggerall = !var(59)
triggerall = command = "holdup"
triggerall = command = "y"
trigger1 = statetype = A  && (ctrl || stateno = 1505)
trigger2 = stateno = 600 && movecontact
trigger3 = stateno = 700 && movecontact

;---------------------------------------------------------------------------
[State -1, Air Medium Punch 2]
type = ChangeState
value = 612
triggerall = !var(59)
triggerall = command = "holddown"
triggerall = command = "y"
trigger1 = statetype = A  && (ctrl || stateno = 1505)
trigger2 = stateno = 600 && movecontact
trigger3 = stateno = 700 && movecontact

;---------------------------------------------------------------------------
[State -1, Air Medium Punch]
type = ChangeState
value = 610
triggerall = !var(59)
triggerall = command = "y"
trigger1 = statetype = A  && (ctrl || stateno = 1505)
trigger2 = stateno = 600 && movecontact
trigger3 = stateno = 700 && movecontact

;---------------------------------------------------------------------------
[State -1, Air Medium Kick]
type = ChangeState
value = 710
triggerall = !var(59)
triggerall = command = "b"
trigger1 = statetype = A  && (ctrl || stateno = 1505)
trigger2 = stateno = 600 && movecontact
trigger3 = stateno = 700 && movecontact
trigger4 = stateno = 610 && movecontact
trigger5 = stateno = 612 && movecontact
trigger6 = stateno = 614 && movecontact

;---------------------------------------------------------------------------
[State -1, Air Strong Punch]
type = ChangeState
value = 620
triggerall = !var(59)
triggerall = command = "z"
trigger1 = statetype = A  && (ctrl || stateno = 1505)
trigger2 = stateno = 600 && movecontact
trigger3 = stateno = 700 && movecontact
trigger4 = stateno = 610 && movecontact
trigger5 = stateno = 612 && movecontact
trigger6 = stateno = 614 && movecontact
trigger7 = stateno = 710 && movecontact
;---------------------------------------------------------------------------
[State -1, Air Strong Kick]
type = ChangeState
value = 720
triggerall = !var(59)
triggerall = command = "c"
trigger1 = statetype = A  && (ctrl || stateno = 1505)
trigger2 = stateno = 600 && movecontact
trigger3 = stateno = 700 && movecontact
trigger4 = stateno = 610 && movecontact
trigger5 = stateno = 612 && movecontact
trigger6 = stateno = 614 && movecontact
trigger7 = stateno = 710 && movecontact
trigger8 = stateno = 620 && movecontact
;---------------------------------------------------------------------------

However, it is also included as a changestate in her aerial attacks as in this example

;Air Medium Punch
[Statedef 610]
type    = A
movetype= A
physics = A
poweradd= 40
ctrl = 0
anim = 610
sprpriority = 2
;velset = 0,0
facep2 = 1

[State 610]
type = PlaySnd
trigger1 = Time = 0
value = 210,0
volume = 100
channel = 1

[State 0, ChangeState]
type = ChangeState
trigger1 = animelem = 16 && var(15)
value = 1505


[state 410,3]
type = velset
triggerall = command = "holdfwd"
trigger1 = var(15)
y = 0
x = -2

[state 410,3]
type = velset
triggerall = command = "holdback"
trigger1 = var(15)
y = 0
x = 2

[state 410,3]
type = veladd
trigger1 = var(15)
y = 0
x = 0

[state 410,3]
type = velset
trigger1 = var(15)
y = 0
x = 0

[state 410,3]
type = veladd
triggerall = prevstateno = 600
triggerall = prevstateno = 700
triggerall = var(18)
trigger1 = floor (pos Y < -155)
y = 0.30

[State 610]
type = PlaySnd
trigger1 = Time = 7
value = 181,1
volume = 255
volumescale = 255
channel = 0

[State 610, VarSet]
type = VarSet
trigger1 = numtarget && prevstateno = [600,720)
trigger1 = target,statetype = A
var(16) = 1

[State 610]
type = PalFx
trigger1 = time%6
time = 1
add = 64,32,64
sinadd = 64,32,64,30

[State 610]
type = HitDef
trigger1 = animelem = 4
attr = A,NA
hitflag = MAF
guardflag = HA
animtype = Medium
air.animtype = up
damage = 35,0
getpower = 30,0
givepower = 20,0
pausetime = 7,9
guard.pausetime = 7,7
sparkno = S9999
guard.sparkno = S8050
sparkxy = -10,-85
hitsound = -1
guardsound = S6+var(39),0
ground.type = High
ground.slidetime = 8
ground.hittime = 10
air.hittime = 12
yaccel = 1.32
ground.velocity = -9.5,0
guard.velocity = -9
down.velocity = -6,-7
ground.cornerpush.veloff = -8
air.cornerpush.veloff = 0
air.velocity = -0.3,-9
airguard.velocity = -10.5,3
fall.xvelocity = 0
fall.yvelocity = -1
air.fall = 1
fall.recover = 0
palfx.time = 31
palfx.add = 40,96,240
palfx.mul = 176,240,240
palfx.sinadd = 8,32,64,4
palfx.color = 8
id = 1+8
p2facing = 1

[state 200, 1]
type = playsnd
trigger1 = movehit = 1 && numtarget
value = s5,6
channel = 7
ignorehitpause = 1
persistent = 0

[state 200, 1]
type = playsnd
triggerall = hitcount = 1
trigger1 = movehit
value = s5+var(39),1
channel = 6
ignorehitpause = 1
persistent = 0


[State G-FX, Hit/Guard Spark]
type = Explod
trigger1 = MoveContact
anim = Cond(MoveHit, 8001, 32004)
postype = p1
pos = Floor(P2Dist X - 10), -85
bindtime = 1
removetime = -2
supermovetime = 500
scale = 0.5, 0.5
ontop = 1
ownpal = 1
ignorehitpause = 1
persistent = 0


[State 610, 3]
type = CtrlSet
trigger1 = animelem = 16
value = 1


[State 620, ChangeState]
type = ChangeState
triggerall = anim = 610
trigger1 = animelem = 16
value = 1211
ctrl = 1

;---------------------------------------------------------------------------

[State -1]
type = ChangeState
value = 40001
triggerall = roundstate = 2 && !var(59) && var(6) < 2
triggerall = command = "214_KK"
trigger1 = statetype = A && ctrl
trigger2 = stateno = 600 
trigger3 = stateno = 610
trigger4 = stateno = 630
trigger5 = stateno = 640
trigger6 = stateno = 650

[State -1]
type = ChangeState
value = 40000
triggerall = roundstate = 2 && !var(59) && var(6) < 2
triggerall = command = "214_KK"
trigger1 = statetype != A && ctrl
trigger2 = stateno = 200
trigger3 = stateno = 210
trigger4 = stateno = 220
trigger5 = stateno = 240
trigger6 = stateno = 300
trigger7 = stateno = 310
trigger8 = stateno = 320
trigger9 = stateno = 400
trigger10 = stateno = 410
trigger11 = stateno = 411
trigger12 = stateno = 420
trigger13 = stateno = 450
trigger14 = stateno = 500
trigger15 = stateno = 510
trigger16 = stateno = 511
trigger17 = stateno = 512
trigger18 = stateno = 520
trigger19 = stateno = 521
trigger20 = stateno = 522
trigger21 = stateno = 523

[State -1]
type = ChangeState
value = 40006
triggerall = roundstate = 2 && !var(59)
triggerall = command = "214_KK"
trigger1 = stateno = 40005
;---------------------------------------------------------------------------
If I do it without any reference in the cns would it look like this?

[State -1]
type = ChangeState
value = 600 (for the jumping light punch)
triggerall = roundstate = 2 && !var(59) && var(6) < 2
triggerall = command = "214_KK"
trigger1 = statetype = A && ctrl
trigger2 = command = "x" 

Re: How To Code Characters To Attack While Flying?
#6  November 02, 2021, 01:04:41 pm
  • avatar
  • **
    • USA
Thank you for your help so far! After looking at it for a little while, I managed to get her attacks to come out while in flight. What I did was remove the ctrl from the trigger1 and instead put && (ctrl || stateno = flight statedef) in the cmd like in the Storm cmd list. It looks like this:

; Jump Strong Punch
[State -1, Jump Strong Punch]
type = ChangeState
value = 620
triggerall = Var(59) <= 0
triggerall = command = "z"
trigger1 = statetype = A
trigger1 = ctrl
trigger2 = (stateno = 600) && movecontact
trigger3 = (stateno = 610) && movecontact
trigger4 = (stateno = 630) && movecontact
trigger5 = (stateno = 640) && movecontact
;---------------------------------------------------------------------------
Here it is corrected

; Jump Strong Punch
[State -1, Jump Strong Punch]
type = ChangeState
value = 620
triggerall = Var(59) <= 0
triggerall = command = "z"
trigger1 = statetype = A && (ctrl || stateno = 40005)
trigger2 = (stateno = 600) && movecontact
trigger3 = (stateno = 610) && movecontact
trigger4 = (stateno = 630) && movecontact
trigger5 = (stateno = 640) && movecontact

;---------------------------------------------------------------------------

The only problem I have now is I do not know how to code the flight where it is not cancelled when Lilith does her attacks while flying. What do I put for that?
Re: How To Code Characters To Attack While Flying?
#7  November 02, 2021, 04:45:06 pm
  • avatar
  • **
    • USA
Okay, now I am able to get Lilith to attack in the air without cancelling the flight. I added this ChangeState to her jumping attacks.

[State 0, ChangeState]
type = ChangeState
triggerall = anim = animation of jumping attack
trigger1 = animtime = 0
value = 40005 (flight statedef)

However, in MVC2 characters could attack without losing their flight height and velocity. This value has to be added to the jumping attacks to make them not have the character drop and remain stationary while they are attacking in flight.

[state 451,3]
type = velset
trigger1 = 1
y = 0
x = 0

Thank you again Cyanide for your help! This thread is solved!