YesNoOk
avatar

Wallbounce early on command grab? (Read 1280 times)

Started by CoffeeFlavoredMilk, September 09, 2021, 08:08:22 pm
Share this topic:
Wallbounce early on command grab?
#1  September 09, 2021, 08:08:22 pm
  • **
  • Snek Friend
    • USA
    • coffeeflavoredmilk.neocities.org/
So basically in my current project, he has a hyper where he sucks up a character and spits them out, resulting in a wallbounce at the end. However, if this move is done near a corner, the character being thrown will just be stuck there motionless for a bit. I want the wallbounce to occur earlier, but don't know how to do this. For reference, this is my code:

;---------------------------------------------------------------------------
; Example
[Statedef 3101]
type    = S
movetype= A
physics = S
juggle  = 4
velset = 0,0
anim = 3101
ctrl = 0
sprpriority = 2

[State 3100, Super E]
type = NotHitBy
trigger1 = AnimElemTime(1) >= 0 && AnimElemTime(17) < 0
value2 = C, NA
time = 1

[State 0, RemoveExplod]
type = RemoveExplod
trigger1 = AnimTime = 0
id = 4060

[State 3100, PlaySnd]
type = PlaySnd
trigger1 = Time = 0
value = S3100,2
channel = 0

[State 3100, PlaySnd]
type = PlaySnd
trigger1 = AnimElem = 4
value = S3100,3
channel = 0

[State 3100, PlaySnd]
type = PlaySnd
trigger1 = AnimElem = 6
value = S3100,4
channel = 0

[State 0, TargetState]
type = TargetState
trigger1 = movehit = 1
trigger1 = numtarget(3102)
value = 3102
ID = 3102
ignorehitpause = 1
persistent = 0

[State 10, Bind 1]
type = TargetBind
trigger1 = AnimElem = 1
pos = 75, 0

[State 10, Bind 2]
type = TargetBind
trigger1 = AnimElem = 2
pos = 46.333333333333, -32.666666666667

[State 10, Bind 3]
type = TargetBind
trigger1 = AnimElem = 3
pos = -12.333333333333, -78.666666666667

[State 10, Bind 4]
type = TargetBind
trigger1 = AnimElem = 4
pos = 43.666666666667, -73.333333333333

[State 10, Bind 5]
type = TargetBind
trigger1 = AnimElem = 5
pos = 52.333333333333, -74

[State 10, Bind 6]
type = TargetBind
trigger1 = AnimElem = 6
pos = 100, -74

[State 10, Bind 8]
type = TargetBind
trigger1 = AnimElem = 7
pos = 180, -74

[State 10, Bind 9]
type = TargetBind
trigger1 = AnimElem = 8
pos = 220, -74

[State 10, Bind 10]
type = TargetBind
trigger1 = AnimElem = 9
pos = 260, -74

[State 10, Bind 11]
type = TargetBind
trigger1 = AnimElem = 10
pos = 300, -74

[State 10, Bind 11]
type = TargetBind
trigger1 = AnimElem = 11
pos = 340, -74

[State 10, Bind 11]
type = TargetBind
trigger1 = AnimElem = 12
pos = 420, -74

[State 10, Hurt]
type = TargetLifeAdd
trigger1 = AnimElem = 12
value = -360

[State 10, State End]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1
;---------------------------------------------------------------------------
; Example2
[Statedef 3102]
type = A
movetype = H
physics = N
velset = 0,0

[State 0, NotHitBy]
type = NotHitBy
trigger1 = time = 0
value = SCA,NA,SA,HA,NP,SP,HP,NT,ST,HT
time = 60

[State 20, 1]
type = ChangeAnim2
trigger1 = Time = 0
value = 3102

[State 1026, Hit wall]
type = ChangeState
triggerall = Pos y < -15
trigger1 = BackEdgeBodyDist <= 20
trigger2 = FrontEdgeBodyDist <= 20
value = 1027

[State 21, 4] ;Hit ground
type = ChangeState
trigger1 = AnimElem = 12
value = 1025 ;Hit ground

As you can tell I tried adding a wallbounce code that is meant to detect 'early' wall hitting, but this results in very funky physics and no wallbounce at all. Perhaps I might need to rewrite this whole code, but who knows.
Re: Wallbounce early on command grab?
#2  September 10, 2021, 11:33:04 am
  • **
  • Get yer gear up!
    • Spain
Code:
[State 1026, Hit wall]
type = ChangeState
triggerall = Pos y < -15
trigger1 = BackEdgeBodyDist <= 20
trigger2 = FrontEdgeBodyDist <= 20
value = 1027

When the opponent is thrown, does so in a parabolic motion? because if that's the case, the highlighted Triggerall should be like triggerall = Pos y => -15  due to the fact the opponent is descending.

Also, if the opponent is only thrown ahead of the thrower, the Trigger1 is therefore redundant since the opponent will always be thrown towards it's front.

It could be useful if you showed us the code of state 1027 to see what can be done about the physics at the impact.
Re: Wallbounce early on command grab?
#3  September 10, 2021, 09:20:47 pm
  • **
  • Snek Friend
    • USA
    • coffeeflavoredmilk.neocities.org/
The wallbounce code ATM is unchanged from KFM, mostly:

;------------------
; Hit by Fast Kung Fu Palm - shaking from the hit
; (a custom gethit state)
; See State 1020 for details
[Statedef 1025]
type    = A
movetype= H
physics = N
velset = 0,0

[State 1025, Anim] ;Custom animation
type = ChangeAnim2
trigger1 = 1
value = 1025

[State 1025, State]
type = ChangeState
trigger1 = HitShakeOver = 1
value = 1026

;------------------
; Hit by Fast Kung Fu Palm - flying through the air
; (a custom gethit state)
[Statedef 1026]
type    = A
movetype= H
physics = N

[State 1026, Velocity]
type = HitVelSet
trigger1 = Time = 0
x = 1
y = 1

[State 1026, Gravity]
type = VelAdd
trigger1 = 1
y = .45

[State 1026, No scroll]
type = ScreenBound
triggerall = Pos y < -15
trigger1 = BackEdgeBodyDist < 65
trigger2 = FrontEdgeBodyDist < 65
value = 1
movecamera = 0,1

[State 1026, Hit wall]
type = ChangeState
triggerall = Pos y < -15
trigger1 = BackEdgeBodyDist <= 20
trigger2 = FrontEdgeBodyDist <= 20
value = 1027

[State 1026, Hit ground]
type = SelfState
trigger1 = (Vel y > 0) && (Pos y >= 0)
value = 5100

;------------------
; Hit by Fast Kung Fu Palm - hit wall
; (a custom gethit state)
[Statedef 1027]
type    = A
movetype= H
physics = N

[State 1027, Turn]
type = Turn
trigger1 = (Time = 0) && (FrontEdgeBodyDist <= 30)

[State 1027, Pos]
type = PosAdd
trigger1 = Time = 0
x = 15 - BackEdgeBodyDist

[State 1027, Stop moving]
type = PosFreeze
trigger1 = 1
x = 1
y = 1

[State 1027, No scroll]
type = ScreenBound
trigger1 = 1
value = 1
movecamera = 0,1

[State 1027, Spark]
type = Explod
trigger1 = Time = 0
anim = F72
pos = 0, floor (screenpos y) - 50
postype = back
sprpriority = 3

[State 1027, Anim]
type = ChangeAnim2
trigger1 = Time = 0
value = 1027

[State 1027, Sound]
type = PlaySnd
trigger1 = Time = 0
value = F7,0

[State 1027, State]
type = ChangeState
trigger1 = AnimTime = 0
value = 1028

;------------------
; Hit by Fast Kung Fu Palm - bounce off wall
; (a custom gethit state)
[Statedef 1028]
type    = A
movetype= H
physics = N

[State 1028, 1]
type = NotHitBy
trigger1 = 1
value = , NA, NP

[State 1028, Vel Y]
type = VelSet
trigger1 = Time = 0
y = -6

[State 1028, Vel X]
type = VelSet
trigger1 = Time = 0
x = 1.6

[State 1028, Turn]
type = Turn
trigger1 = (Time = 0) && (BackEdgeDist < 30)

[State 1028, Gravity]
type = VelAdd
trigger1 = 1
y = .35

[State 1028, Anim 5050] ;Self falling animation
type = ChangeAnim
trigger1 = Time = 0
trigger1 = !SelfAnimExist(5052)
value = 5050

[State 1028, Anim 5052] ;Self falling animation (diagup type)
type = ChangeAnim
trigger1 = Time = 0
trigger1 = SelfAnimExist(5052)
value = 5052

[State 1028, Anim 5060] ;Coming down - normal
type = ChangeAnim
trigger1 = Vel Y > -2
trigger1 = Anim = 5050
trigger1 = SelfAnimExist(5060)
persistent = 0
value = 5060

[State 1028, Anim 5062] ;Coming down - diagup type
type = ChangeAnim
trigger1 = Vel Y > -2
trigger1 = Anim = 5052
trigger1 = SelfAnimExist(5062)
persistent = 0
value = 5062

[State 1028, Hit ground]
type = SelfState
trigger1 = (Vel y > 0) && (Pos y >= 0)
value = 5100
Re: Wallbounce early on command grab?
#4  September 10, 2021, 10:35:29 pm
  • **
  • Get yer gear up!
    • Spain
Adding to what I’ve previously said, I would try removing the triggerall = Pos y < -15 from the ChangeState in 1026 since that could be preventing the “hit wall” state from triggering due to unmet conditions.
The other two triggers from that changestate could also use higher values for earlier detection of the side of the screen the opponent is being thrown at.

If necessary, tomorrow I could show you some abridged code of my Trackhead who has an hyper attack just like you described in OP so you can (although it has one bug I still need to fix).
Re: Wallbounce early on command grab?
#5  September 10, 2021, 11:05:07 pm
  • **
  • Snek Friend
    • USA
    • coffeeflavoredmilk.neocities.org/
Sounds good. So far I did change what you said, no 'early' wallbounce though since still the foe is still stuck in air for a few minutes if by a corner. I changed 20 on the other values to 40, so far nothing, but perhaps maybe that's too little.

Though perhaps I should also show the move visually through video to better illustrate what its meant to do and what it does near a corner:

https://streamable.com/756w9w
Last Edit: September 10, 2021, 11:15:53 pm by CoffeeFlavoredMilk
Re: Wallbounce early on command grab?
#6  September 11, 2021, 01:18:21 pm
  • **
  • Get yer gear up!
    • Spain
Okay, here it is, with stuff such as custom animations, helpers, sounds and explods removed, only the stuff that matters.
You can see how the move works here.



Code:
[statedef 10706]
type = S
physics = N
movetype = H
anim = 10604
ctrl = 0
velset = 0,0
sprpriority = 4

[State 10706, VelSet]
type = Veladd
trigger1 = gametime%2 = 1
x = 0.3

[State 10706, VelSet]
type = Veladd
trigger1 = pos y < 0
y = 1

[State 10706, VelSet]
type = VelSet
trigger1 = pos y > 0
y = 0

[State 10706, ChangeState]
type = ChangeState
trigger1 = p2dist x =< 35
value = 10707
ctrl = 0

;Recycle inhaler - Opponent gets swallowed
[statedef 10707]
type = S
physics = S
movetype = U
sprpriority = 4
anim = -1
ctrl = 0
velset = 0,-6

[State 10707, PosAdd]
type = PosAdd
trigger1 = time = 1
y = -4

[State 10707, PosAdd]
type = PosAdd
trigger1 = time = 2
y = -3

[State 10707, PosAdd]
type = PosAdd
trigger1 = time = 3
y = -3

[State 10707, PosAdd]
type = PosAdd
trigger1 = time = 4
y = -2

[State 10707, PosAdd]
type = PosAdd
trigger1 = time = 5
y = -2

[State 10707, PosAdd]
type = PosAdd
trigger1 = time = 6
y = -1

;shrink effect
[State 10707, VarAdd]
type = Varset
trigger1 = time = 6
fv = 4
value = 0.90

[State 10707, VarAdd]
type = Varset
trigger1 = time = 5
fv = 4
value = 0.80

[State 10707, VarAdd]
type = Varset
trigger1 = time = 4
fv = 4
value = 0.65

[State 10707, VarAdd]
type = Varset
trigger1 = time = 3
fv = 4
value = 0.45

[State 10707, VarAdd]
type = Varset
trigger1 = time = 2
fv = 4
value = 0.20

[State 10707, VarAdd]
type = Varset
trigger1 = time = 1
fv = 4
value = 0.10

[State 10707, AngleDraw]
type = AngleDraw
trigger1 = time < 8
value = 0
scale = 1-fvar(4),1-fvar(4)

[State 10707, AssertSpecial]
type = AssertSpecial
trigger1 = time > 7
flag = invisible

[State 10707, PosSet]
type = PosSet
trigger1 = time > 7
x = enemy,pos x

[State 10707, VelSet]
type = VelSet
trigger1 = pos y < -10
y = 2

[State 10707, VelSet]
type = VelSet
trigger1 = time > 10
x = 0
y = 0

[State 10707, NotHitBy]
type = NotHitBy
trigger1 = 1
value = SCA,NA,SA,HA,NP,SP,HP,NT,ST,HT

[State 10707, ChangeState]
type = ChangeState
trigger1 = p2stateno = 10704
value = 10708
ctrl = 0

;Recycle inhaler - Opponent gets blasted out
[statedef 10708]
type = S
physics = N
movetype = U
anim = 10605
ctrl = 0
velset = -14

[State 10708, VarAdd]
type = Varset
trigger1 = !time
fv = 4
value = 1

[State 10708, PlayerPush]
type = PlayerPush
trigger1 = 1
value = 0

[State 10708, PosSet]
type = PosSet
trigger1 = !time
y = -39

[State 10708, NotHitBy]
type = NotHitBy
trigger1 = 1
value = SCA,NA,SA,HA,NP,SP,HP,NT,ST,HT

[State 10708, ChangeState]
type = ChangeState
trigger1 = BackEdgeBodyDist <= 20
value = 10709
ctrl = 0

;Recycle inhaler - Opponent gets crashed against wall
[statedef 10709]
type    = A
movetype= H
physics = N
ctrl = 0
velset = 2,-12

[State 10709, PosAdd]
type = PosAdd
trigger1 = !time
y = 30

[State 10709, ChangeAnim2]
type = ChangeAnim2
trigger1 = !time
value = 5052

[State 10709, LifeAdd]
type = LifeAdd
trigger1 = !time
value = -175
kill = 1

[state 10709, angledraw]
type = angleDraw
trigger1 = 1

[state 10709, angleadd]
type = angleAdd
trigger1 = gametime%2600
value = 2

[State 10709, Gravity]
type = Gravity
trigger1 = 1

[State 10709, Hit ground]
type = SelfState
trigger1 = Pos y >= 0
value = 5100

Also, I misunderstood the problem you had on the corner, I thought that it only happened when the opponent was near the thrower's corner, not the opposite. Therefore the values on those two trigger's should be lower, around 10 or 0, possibly even a negative value.
Re: Wallbounce early on command grab?
#7  September 11, 2021, 08:11:56 pm
  • **
  • Snek Friend
    • USA
    • coffeeflavoredmilk.neocities.org/
The coding did work nice, problem is now when its directly AT a corner, there's no wallbounce. The hitspark for wallbouncing shows up, but the character gets sucked up at the corner cancelling the potential wallbounce and thus making the character plop on the ground.

Setting BackEdgeBodyDist to -10 fixed the issue at the corner, but that bugs when the move is used from afar. I've tried combining both, basically trying to make it say 'if at a corner, make this the case, and if not make this the case' though the 0 out prioritizes the -10. Obviously this is because there are numbers that are BOTH less than -10 and less than 0 (-11 for example):

[State 1026, Hit wall]
type = ChangeState
trigger1 = BackEdgeBodyDist <= 0
trigger2 = BackEdgeBodyDist <= -10
value = 1025

There's perhaps a script command that's really obvious that I'm missing here, so help me on that, please?

Re: Wallbounce early on command grab?
#8  September 12, 2021, 10:47:36 am
  • **
  • Get yer gear up!
    • Spain
The reason for that might be due to the first part of my custom state where the opponent gets pulled in, since Four's hyper is more like a standard grab, the state 10706 is unnecessary.
So basically in Four's hitdef, change the p2stateno to go to state 10707 (or whatever you reassigned it to) instead of 10706.
Re: Wallbounce early on command grab?
#9  September 12, 2021, 05:59:37 pm
  • **
  • Snek Friend
    • USA
    • coffeeflavoredmilk.neocities.org/
Perhaps I could get up a video clip showcasing this for clarification:
https://streamable.com/8v2e55

Maybe the p2dist is the solution I desire? I tried this but it just bugs up the whole thing. Also a code dump of the current state of the hyper.

;---------------------------------------------------------------------------
; Example - 1
[Statedef 3100]
type    = S
movetype= A
physics = S
juggle  = 4
velset = 0,0
anim = 3100
ctrl = 0
sprpriority = 2

[State 3100, Super A]
type = SuperPause
trigger1 = AnimElem = 2, 1
pos = 25, -57
anim = 100
sound = S8889, 0
poweradd = -2000
movetime = 35
time = 35

[State 3000, Explod]
type = Explod
trigger1 = time = 0
anim = 4090
ID = 4090
pos = 0,0
postype = left
facing = 1
bindtime = -1
removetime = 40
sprpriority = -7
ownpal = 1
supermovetime = 40
removeongethit = 1

[State 3000, 0]
type = Explod
trigger1 = time = 0
anim = 4100
ID = 4100
pos = 0,0
postype = back
bindtime = -1
removetime = 50
scale = 1,1
sprpriority = -1
supermove = 1

[State Super BG]
type = Explod
trigger1 = time = 0
anim = 4060
ID = 4060
pos = 0,0
postype = left
bindtime = -1
removetime = 320
pausemovetime = 0
supermovetime = 9999
scale = .666667,.75
sprpriority = -9
ownpal = 1
removeongethit = 1

[State 3100, Super B]
type = AfterImage
trigger1 = AnimElem = 2, 1
time = 2

[State 3100, Super C]
type = AfterImageTime
trigger1 = AnimElemTime(2) >= 1 && Time < 60
time = 2

[State 3100, Super E]
type = NotHitBy
trigger1 = AnimElemTime(2) >= 0 && AnimElemTime(14) < 0
value2 = C, NA
time = 1

[State 3100, PlaySnd]
type = PlaySnd
trigger1 = Time = 0
value = S3100,0
channel = 0

[State 3100, PlaySnd]
type = PlaySnd
trigger1 = AnimElem = 15
value = S3100,1
channel = 0

[State 0, RemoveExplod]
type = RemoveExplod
trigger1 = AnimElem = 15
id = 4060

[State 3100, HitDef]
type = HitDef
trigger1 = time = 0
attr = S, HA, ST
hitflag = M
priority = 1, Miss
sparkno = -1
p1facing = 1
p1stateno = 3101
p2stateno = 3102
givepower = 0
getpower = 0

[State 3100, 7]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1

[State 3100, 7]
type = ChangeState
trigger1 = MoveHit
value = 3101

;---------------------------------------------------------------------------
; Example - 2
[Statedef 3101]
type    = S
movetype= A
physics = S
juggle  = 4
velset = 0,0
anim = 3101
ctrl = 0
sprpriority = 2

[State 3100, Super E]
type = NotHitBy
trigger1 = AnimElemTime(1) >= 0 && AnimElemTime(17) < 0
value2 = C, NA
time = 1

[State 0, RemoveExplod]
type = RemoveExplod
trigger1 = AnimTime = 0
id = 4060

[State 3100, PlaySnd]
type = PlaySnd
trigger1 = Time = 0
value = S3100,2
channel = 0

[State 3100, PlaySnd]
type = PlaySnd
trigger1 = AnimElem = 4
value = S3100,3
channel = 0

[State 3100, PlaySnd]
type = PlaySnd
trigger1 = AnimElem = 6
value = S3100,4
channel = 0

[State 0, TargetState]
type = TargetState
trigger1 = movehit = 1
trigger1 = numtarget(3102)
value = 3102
ID = 3102
ignorehitpause = 1
persistent = 0

[State 10, Bind 1]
type = TargetBind
trigger1 = AnimElem = 1
pos = 75, 0

[State 10, Bind 2]
type = TargetBind
trigger1 = AnimElem = 2
pos = 46.333333333333, -32.666666666667

[State 10, Bind 3]
type = TargetBind
trigger1 = AnimElem = 3
pos = -12.333333333333, -78.666666666667

[State 10, Bind 4]
type = TargetBind
trigger1 = AnimElem = 4
pos = 43.666666666667, -73.333333333333

[State 10, Bind 5]
type = TargetBind
trigger1 = AnimElem = 5
pos = 52.333333333333, -74

[State 10, Hurt]
type = TargetLifeAdd
trigger1 = AnimElem = 12
value = -360

[State 10, State End]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1

;---------------------------------------------------------------------------
; Example - 3
[Statedef 3102]
type = A
movetype = H
physics = N
velset = 0,0

[State 0, NotHitBy]
type = NotHitBy
trigger1 = time = 0
value = SCA,NA,SA,HA,NP,SP,HP,NT,ST,HT
time = 60

[State 20, 1]
type = ChangeAnim2
trigger1 = Time = 0
value = 3102

[State 0, VelSet]
type = VelSet
trigger1 = AnimElem = 6
x = -20

[State 1026, Hit wall]
type = ChangeState
trigger1 = BackEdgeBodyDist <= 0
trigger2 = FrontEdgeBodyDist <= -10
value = 1025

;------------------
; Hit by Fast Kung Fu Palm - shaking from the hit
; (a custom gethit state)
; See State 1020 for details
[Statedef 1025]
type    = A
movetype= H
physics = N
velset = 0,0

[State 1025, Anim] ;Custom animation
type = ChangeAnim2
trigger1 = 1
value = 1025

[State 1025, State]
type = ChangeState
trigger1 = HitShakeOver = 1
value = 1026

;------------------
; Hit by Fast Kung Fu Palm - flying through the air
; (a custom gethit state)
[Statedef 1026]
type    = A
movetype= H
physics = N

[State 1026, Velocity]
type = HitVelSet
trigger1 = Time = 0
x = 1
y = 1

[State 1026, Gravity]
type = VelAdd
trigger1 = 1
y = .45

[State 1026, No scroll]
type = ScreenBound
triggerall = Pos y < -15
trigger1 = BackEdgeBodyDist < 65
trigger2 = FrontEdgeBodyDist < 65
value = 1
movecamera = 0,1

[State 1026, Hit wall]
type = ChangeState
trigger1 = BackEdgeBodyDist <= 0
trigger2 = FrontEdgeBodyDist <= 0
value = 1027

[State 1026, Hit ground]
type = SelfState
trigger1 = (Vel y > 0) && (Pos y >= 0)
value = 5100

;------------------
; Hit by Fast Kung Fu Palm - hit wall
; (a custom gethit state)
[Statedef 1027]
type    = A
movetype= H
physics = N

[State 1027, Turn]
type = Turn
trigger1 = (Time = 0) && (FrontEdgeBodyDist <= 30)

[State 1027, Pos]
type = PosAdd
trigger1 = Time = 0
x = 15 - BackEdgeBodyDist

[State 1027, Stop moving]
type = PosFreeze
trigger1 = 1
x = 1
y = 1

[State 1027, No scroll]
type = ScreenBound
trigger1 = 1
value = 1
movecamera = 0,1

[State 1027, Spark]
type = Explod
trigger1 = Time = 0
anim = F72
pos = 0, floor (screenpos y) - 50
postype = back
sprpriority = 3

[State 1027, Anim]
type = ChangeAnim2
trigger1 = Time = 0
value = 1027

[State 1027, Sound]
type = PlaySnd
trigger1 = Time = 0
value = F7,0

[State 1027, State]
type = ChangeState
trigger1 = AnimTime = 0
value = 1028

;------------------
; Hit by Fast Kung Fu Palm - bounce off wall
; (a custom gethit state)
[Statedef 1028]
type    = A
movetype= H
physics = N

[State 1028, 1]
type = NotHitBy
trigger1 = 1
value = , NA, NP

[State 1028, Vel Y]
type = VelSet
trigger1 = Time = 0
y = -6

[State 1028, Vel X]
type = VelSet
trigger1 = Time = 0
x = 1.6

[State 1028, Turn]
type = Turn
trigger1 = (Time = 0) && (BackEdgeDist < 30)

[State 1028, Gravity]
type = VelAdd
trigger1 = 1
y = .35

[State 1028, Anim 5050] ;Self falling animation
type = ChangeAnim
trigger1 = Time = 0
trigger1 = !SelfAnimExist(5052)
value = 5050

[State 1028, Anim 5052] ;Self falling animation (diagup type)
type = ChangeAnim
trigger1 = Time = 0
trigger1 = SelfAnimExist(5052)
value = 5052

[State 1028, Anim 5060] ;Coming down - normal
type = ChangeAnim
trigger1 = Vel Y > -2
trigger1 = Anim = 5050
trigger1 = SelfAnimExist(5060)
persistent = 0
value = 5060

[State 1028, Anim 5062] ;Coming down - diagup type
type = ChangeAnim
trigger1 = Vel Y > -2
trigger1 = Anim = 5052
trigger1 = SelfAnimExist(5062)
persistent = 0
value = 5062

[State 1028, Hit ground]
type = SelfState
trigger1 = (Vel y > 0) && (Pos y >= 0)
value = 5100
Last Edit: September 12, 2021, 06:05:29 pm by CoffeeFlavoredMilk
Re: Wallbounce early on command grab?
#10  September 12, 2021, 07:56:55 pm
  • **
  • Get yer gear up!
    • Spain
I've set up a copy of Kung Fu Man to test the states 3102 and 1025-1028 you posted here.
In state 3102’s changestate you should have it like this.

[State 1026, Hit wall]
type = ChangeState
triggerall = animelem >= 6
trigger1 = BackEdgeBodyDist <= 0
trigger2 = FrontEdgeBodyDist <= 0
value = 1027

Why? you may want the wall bounce to take effect at least after the opponent accelerates, which according to the same state’s VelSet, happens after the 6th frame of the custom state's animation.
But since there wasn't that Triggerall, it could trigger immediately since the opponent is right next to the corner.

Since I don't have the required custom anim, the attack was buggy when I slammed it into KFM but it should work on your Four with the small change I added.
Last Edit: September 12, 2021, 08:01:59 pm by Trackiest head
Re: Wallbounce early on command grab?
#11  September 12, 2021, 08:30:57 pm
  • **
  • Snek Friend
    • USA
    • coffeeflavoredmilk.neocities.org/
I tried that and it worked great. Thank you!

Just need to adjust the Velset right now.
Re: Wallbounce early on command grab?
#12  September 12, 2021, 10:16:06 pm
  • **
  • Get yer gear up!
    • Spain
Glad to have helped
 :hyo: