YesNoOk
avatar

How Can I Make This Attack An Air Move That Can Be Performed While Jumping? (Read 22167 times)

Started by Ki$@1st456v, May 15, 2022, 11:09:14 AM
Share this topic:
How Can I Make This Attack An Air Move That Can Be Performed While Jumping?
#1  May 15, 2022, 11:09:14 AM
  • avatar
  • **
    • USA
Hi, again everyone. I had this MK Sektor-like tracking teleport uppercut move that I saw from a MVC2 version of Fulgore I had downloaded. It is a move that works from the ground, but I am trying to get it to where I can do it from the air during a jump or superjump. I have the code for the ground type that already works and I did not have to alter much except the statedef and animation numbers to work wth my character, but in the code at 60000068 I had tried to do an air version by changing the type to A for "aerial" in the statedef. Yet when I try it my character gets frozen in the air. I am not sure what else I need to add to the move to make it usable in the air. 


[Statedef 60000066]
type = S
movetype = A
poweradd = 100
physics = N
ctrl = 0
anim = 60000066
velset = 0,0
chain.id = 1000

[State 1701,0]
Type=PlaySnd
Trigger1 = AnimElem = 2,5
Value = 50,4

[State 1701,0]
Type=PlaySnd
Trigger1 = Anim=1900&&AnimElem = 4
Value = 1,1

[State 1900, AfterImage]
type = AfterImage
trigger1 = AnimElem= 1
time = 25
trans = add1
palbright = 0,0,0
palcontrast = 128,128,128
PalAdd=10,90,30
PalMul=1,1,1
length = 20
timegap = 1

[State 1900, AfterImage]
type = AfterImage
trigger1 = AnimElem= 4
time = 25
trans = add1
palbright = 0,0,0
palcontrast = 128,128,128
PalAdd=10,90,30
PalMul=1,1,1
length = 20
timegap = 1

[State 1900, snd]
type = PlaySnd
trigger1 = AnimElem = 1
value = 300,1
volume = 355

[State 1900, snd]
type = PlaySnd
trigger1 = AnimElem = 1
value = 300,6
volume = 355

[State 1900, 1]
type = AssertSpecial
trigger1 = pos y!= 0
flag = noshadow

[State 1900, 2]
type = VelSet
trigger1 = AnimElem = 3
y = 15

[State 1900, 3]
type = PosAdd
trigger1 = AnimElem = 4
X = (P2Dist X) - 2

[State 1900, 3bis]
type = PosSet
trigger1 = AnimElem = 4
Y = 200

[State 1900, 4]
type = VelSet
trigger1 = AnimElem = 4
y = -10

[State 1900, 5]
type = HitDef
trigger1 = AnimElem = 4
attr = A, NA
damage = 100
hitflag = MADF
guardflag = MA
priority = 4
sparkno = -1
sparkxy = -10,-65
hitsound   = s400,0
guardsound = 5,4
guard.pausetime = 15,15
animtype = Up
ground.type = High
ground.slidetime = 17
ground.hittime  = 17
ground.velocity = 0, -10
air.velocity = -3,-4
fall = 1
kill = !var(59)
id = 1020

[State 1900, 6]
type = Helper
triggerall = NumHelper(60000067) = 0
trigger1 = Movehit && Time >=0 && Time <= 20
helpertype = Normal
ID = 60000067
name = "Sangue003"
postype = p2
pos = 0,-110
stateno = 60000067
ownpal = 1
keyctrl = 0

[State 1900, 7]
type = VelSet
trigger1 = AnimElem = 5
y = 10

[State 1900, 9]
type = VelSet
trigger1 = AnimElem = 7
trigger1 = Pos Y = 0
y = -25

[State 1900, 10]
type = PosSet
trigger1 = AnimElem = 8
y = -40

[State 1900, 11]
type = ChangeState
Trigger1 = AnimTime = 0
value = 0
ctrl = 1
;--------------------------------------------------------------

[Statedef 60000067]
type = S
movetype = A
physics = N
anim = 7763
velset = 0,0
ctrl = 1
sprpriority = -2

[State 8000, Vel]
type = VelSet
trigger1 = anim != 7764
trigger1 = AnimElem = 26
Y = 7

[State 200, 1]
type = PlaySnd
trigger1 = Pos Y >= -100
value = 30, ceil(random/300)

[State 60021, Explod]
type = Explod
Trigger1 = Pos Y >= -100
anim = 7764
postype = p1
pos = 0,-30
ID = 7764
facing = -1
sprpriority = -2

[State 8601, 3]
type = Destroyself
trigger1 = Pos Y >= -100

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

[Statedef 60000068]
type = A
movetype = A
poweradd = 100
physics = N
ctrl = 0
anim = 60000068
velset = 0,0
chain.id = 1000

[State 1701,0]
Type=PlaySnd
Trigger1 = AnimElem = 2,5
Value = 50,4

[State 1701,0]
Type=PlaySnd
Trigger1 = Anim=1900&&AnimElem = 4
Value = 1,1

[State 1900, AfterImage]
type = AfterImage
trigger1 = AnimElem= 1
time = 25
trans = add1
palbright = 0,0,0
palcontrast = 128,128,128
PalAdd=10,90,30
PalMul=1,1,1
length = 20
timegap = 1

[State 1900, AfterImage]
type = AfterImage
trigger1 = AnimElem= 4
time = 25
trans = add1
palbright = 0,0,0
palcontrast = 128,128,128
PalAdd=10,90,30
PalMul=1,1,1
length = 20
timegap = 1

[State 1900, snd]
type = PlaySnd
trigger1 = AnimElem = 1
value = 300,1
volume = 355

[State 1900, snd]
type = PlaySnd
trigger1 = AnimElem = 1
value = 300,6
volume = 355

[State 1900, 1]
type = AssertSpecial
trigger1 = pos y!= 0
flag = noshadow

[State 1900, 2]
type = VelSet
trigger1 = AnimElem = 3
y = 15

[State 1900, 3]
type = PosAdd
trigger1 = AnimElem = 4
X = (P2Dist X) - 2

[State 1900, 3bis]
type = PosSet
trigger1 = AnimElem = 4
Y = 200

[State 1900, 4]
type = VelSet
trigger1 = AnimElem = 4
y = -10

[State 1900, 5]
type = HitDef
trigger1 = AnimElem = 4
attr = A, NA
damage = 100
hitflag = MADF
guardflag = MA
priority = 4
sparkno = -1
sparkxy = -10,-65
hitsound   = s400,0
guardsound = 5,4
guard.pausetime = 15,15
animtype = Up
ground.type = High
ground.slidetime = 17
ground.hittime  = 17
ground.velocity = 0, -10
air.velocity = -3,-4
fall = 1
kill = !var(59)
id = 1020

[State 1900, 6]
type = Helper
triggerall = NumHelper(60000067) = 0
trigger1 = Movehit && Time >=0 && Time <= 20
helpertype = Normal
ID = 60000067
name = "Sangue003"
postype = p2
pos = 0,-110
stateno = 60000067
ownpal = 1
keyctrl = 0

[State 1900, 7]
type = VelSet
trigger1 = AnimElem = 5
y = 10

[State 1900, 9]
type = VelSet
trigger1 = AnimElem = 7
trigger1 = Pos Y = 0
y = -25

[State 1900, 10]
type = PosSet
trigger1 = AnimElem = 8
y = -40

[State 1900, 12]
type = ChangeState
Trigger1 = AnimTime = 0
value = 12
ctrl = 1

I also have the code for both moves in the cmnd file.

[State -1, TELEPORT PUNCH]
type = ChangeState
value = 60000066
triggerall = command = "telep"
triggerall = P2Life>=2
trigger1 = statetype = S
trigger1 = ctrl
trigger2 = StateNo = 200 && Movecontact
trigger3 = StateNo = 230 && Movecontact
trigger4 = StateNo = 210 && Movecontact
trigger5 = StateNo = 240 && Movecontact
trigger6 = StateNo = 220 && Movecontact
trigger7 = StateNo = 250 && Movecontact
trigger8 = StateNo = 400 && Movecontact
trigger9 = StateNo = 430 && Movecontact
trigger10 = StateNo = 410 && Movecontact
trigger11 = StateNo = 440 && Movecontact

;---------------------------------------------------------------------------
[State -1, TELEPORT PUNCH]
type = ChangeState
value = 60000068
triggerall = command = "telep"
triggerall = P2Life>=2
trigger1 = statetype = A
trigger1 = ctrl
trigger2 = StateNo = 200 && Movecontact
trigger3 = StateNo = 230 && Movecontact
trigger4 = StateNo = 210 && Movecontact
trigger5 = StateNo = 240 && Movecontact
trigger6 = StateNo = 220 && Movecontact
trigger7 = StateNo = 250 && Movecontact
trigger8 = StateNo = 400 && Movecontact
trigger9 = StateNo = 430 && Movecontact
trigger10 = StateNo = 410 && Movecontact
trigger11 = StateNo = 440 && Movecontact


I appreciate the help I have been given so far and I appreciate any assistance with this topic. Everyone take care.
Re: How Can I Make This Attack An Air Move That Can Be Performed While Jumping?
#2  May 15, 2022, 11:58:29 AM
  • *****
  • Resident Tosspot
  • Pftheh
    • UK
    • plasmoidthunder.neocities.org
The character is returning to state 0 after the animation is over. They need to change to a landing state when they reach the ground.

Code:
[State 1900, 11]
type = ChangeState
trigger1 = vel y > 0 ;Falling
trigger1 = pos y >= -(vel y) ;Hit the ground
value = ;Your landing state

You may not want to use the default landing state (52) as you can usually cancel out of it early.

Oh, I want a diagram. I fucking love diagrams.
Re: How Can I Make This Attack An Air Move That Can Be Performed While Jumping?
#3  May 16, 2022, 12:52:07 AM
  • avatar
  • **
    • USA
Thanks Plasmoid, but my character still gets frozen right above the ground when I try to perform the move in the air. I do not know what else I am missing.
I have this so far.

[Statedef 60000068]
type = A
movetype = A
poweradd = 100
physics = N
ctrl = 0
anim = 60000068
velset = 0,0
chain.id = 1000

[State 1701,0]
Type=PlaySnd
Trigger1 = AnimElem = 2,5
Value = 50,4

[State 1701,0]
Type=PlaySnd
Trigger1 = Anim=1900&&AnimElem = 4
Value = 1,1

[State 1900, AfterImage]
type = AfterImage
trigger1 = AnimElem= 1
time = 25
trans = add1
palbright = 0,0,0
palcontrast = 128,128,128
PalAdd=10,90,30
PalMul=1,1,1
length = 20
timegap = 1

[State 1900, AfterImage]
type = AfterImage
trigger1 = AnimElem= 4
time = 25
trans = add1
palbright = 0,0,0
palcontrast = 128,128,128
PalAdd=10,90,30
PalMul=1,1,1
length = 20
timegap = 1

[State 1900, snd]
type = PlaySnd
trigger1 = AnimElem = 1
value = 300,1
volume = 355

[State 1900, snd]
type = PlaySnd
trigger1 = AnimElem = 1
value = 300,6
volume = 355

[State 1900, 1]
type = AssertSpecial
trigger1 = pos y!= 0
flag = noshadow

[State 1900, 2]
type = VelSet
trigger1 = AnimElem = 3
y = 15

[State 1900, 3]
type = PosAdd
trigger1 = AnimElem = 4
X = (P2Dist X) - 2

[State 1900, 3bis]
type = PosSet
trigger1 = AnimElem = 4
Y = 200

[State 1900, 4]
type = VelSet
trigger1 = AnimElem = 4
y = -10

[State 1900, 5]
type = HitDef
trigger1 = AnimElem = 4
attr = A, NA
damage = 100
hitflag = MADF
guardflag = MA
priority = 4
sparkno = -1
sparkxy = -10,-65
hitsound   = s400,0
guardsound = 5,4
guard.pausetime = 15,15
animtype = Up
ground.type = High
ground.slidetime = 17
ground.hittime  = 17
ground.velocity = 0, -10
air.velocity = -3,-4
fall = 1
kill = !var(59)
id = 1020

[State 1900, 6]
type = Helper
triggerall = NumHelper(60000067) = 0
trigger1 = Movehit && Time >=0 && Time <= 20
helpertype = Normal
ID = 60000067
name = "Sangue003"
postype = p2
pos = 0,-110
stateno = 60000067
ownpal = 1
keyctrl = 0

[State 1900, 7]
type = VelSet
trigger1 = AnimElem = 5
y = 10

[State 1900, 9]
type = VelSet
trigger1 = AnimElem = 7
trigger1 = Pos Y = 0
y = -25

[State 1900, 10]
type = PosSet
trigger1 = AnimElem = 8
y = -40

[State 1900, 11]
type = ChangeState
trigger1 = vel y > 0 ;Falling
trigger1 = pos y = 0 ;Hit the ground
value = 52
ctrl = 1
Re: How Can I Make This Attack An Air Move That Can Be Performed While Jumping?
#4  May 16, 2022, 10:10:49 AM
  • *****
  • Resident Tosspot
  • Pftheh
    • UK
    • plasmoidthunder.neocities.org
Does any part of the move occur, or do they just hover in midair upon activation? If so, that would imply the VelSet sctrls are told to trigger on animelems that don't exist, so they never do.

Side note: the reason the ChangeState triggers were written as such is to failsafe in the event the character's current pos + vel y would put them below pos 0.

Oh, I want a diagram. I fucking love diagrams.
Re: How Can I Make This Attack An Air Move That Can Be Performed While Jumping?
#5  May 20, 2022, 01:37:01 PM
  • avatar
  • **
    • USA
Re: How Can I Make This Attack An Air Move That Can Be Performed While Jumping?
#6  May 20, 2022, 07:43:05 PM
  • *****
  • Resident Tosspot
  • Pftheh
    • UK
    • plasmoidthunder.neocities.org
Does anim 60000068 exist? The video seems to imply he's stuck in the jump anim.

Oh, I want a diagram. I fucking love diagrams.
Re: How Can I Make This Attack An Air Move That Can Be Performed While Jumping?
#7  May 21, 2022, 11:45:49 AM
  • avatar
  • **
    • USA
Thank you again PlasmoidThunder! I was going too fast and I left out the animation for the air version of the move. The uppercut works during a super jump. However, he just teleports to the ground during a normal jump. Is there a way to fix that?
Re: How Can I Make This Attack An Air Move That Can Be Performed While Jumping?
#8  May 22, 2022, 11:02:37 AM
  • *****
  • Resident Tosspot
  • Pftheh
    • UK
    • plasmoidthunder.neocities.org
Likely because the position and velocity adjustments during the attack put him on or below the ground, triggering the ChangeState to jump land.

Oh, I want a diagram. I fucking love diagrams.
Re: How Can I Make This Attack An Air Move That Can Be Performed While Jumping?
#9  June 02, 2022, 10:01:03 AM
  • avatar
  • **
    • USA
Thank you again PlasmoidThunder! I wanted to give what I put to solve this question. At the end of the coding for the air version of the move, I decided to put this.

[State 1900, 11]
type = ChangeState
trigger1 = vel y > 0 ;Falling
trigger1 = pos y >= 0 ;Hit the ground
value = 52
ctrl = 1

For both positions for the y value, I think it makes the triggers read now so that whenever X is any distance above the ground, the conditions are met where he can perform the move in the air. Thank you for your help again, and this topic is solved!