YesNoOk
avatar

Can't continue combos (Read 953 times)

Started by Drewism19, February 26, 2021, 11:32:37 PM
Share this topic:
Can't continue combos
#1  February 26, 2021, 11:32:37 PM
  • *
    • USA
How would I go about making it so that after a down bounce and the opponent is in the air falling, I can continue to combo. I have a move that slams the opponent into the ground and they bounce, but when I go to hit them while they're bouncing, it doesn't connect, I don't think it's the hitbox at least. Here's the code for the move, don't know if it will help.
Code:
;Jump Strong Punch
; CNS difficulty: easy
[Statedef 610]
type    = A
movetype= A
physics = A
juggle  = 0
poweradd= 30
ctrl = 0
anim = 610
sprpriority = 2

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

[State 610, 3]
type = HitDef
trigger1 = Time = 0
attr = A, NA
getpower = 15
damage = 23
animtype = light
guardflag = HA
hitflag = MAFD
priority = 3
pausetime = 8,8
guard.pausetime = 17,20
hitsound   = S8,2
guardsound = S9,1
ground.type = high
ground.slidetime = 0
guard.slidetime = 9
ground.hittime  = 15
ground.velocity = -2,22
airguard.velocity = -1,-.8
air.type = high
air.velocity = -2, 22
air.hittime = 2
fall = 1
fall.yvelocity = -9
down.bounce = 9
p2facing =1
Last Edit: March 06, 2021, 04:23:38 AM by Drewism19
Re: Can't continue combos
#2  February 26, 2021, 11:46:07 PM
  • ****
  • CPU Purple Heart
    • USA
    • www.dailymotion.com/2a8130871d2742d2f4da3b069

  • Online
 I've actually struggled with this while working on my very first character. I ultimately learned that down.bounce is the target still in their liedown statedef (i.e.: their statetype is L). This means you can't hit them even while they down.bounce unless your hitflag has D in it. Meaning that at least the strong punch you posted above will connect, but anything else with no D in their hitflag will not. If you want to actually create a true groundbounce state, it has to put P2 in a custom state so that they'll be in statetype A instead of L.
Last Edit: February 27, 2021, 01:38:27 AM by Nep Heart
Re: Can't continue combos
#3  February 26, 2021, 11:53:28 PM
  • *
    • USA
I've actually struggled with this while working on my very first character. I ultimately learned that down.bounce is the target are still in their liedown statedef (i.e.: their statetype is L). This means you can't hit them even while they down.bounce unless your hitflag has D in it. Meaning that at least the strong punch you posted above will connect, but anything else with no D in their hitflag will not. If you want to actually create a true groundbounce state, it has to put P2 in a custom state so that they'll be in statetype A instead of L.

Okay, thanks a lot. Do you have any clue on how I would go about changing P2's state? if not that's all good.

DS

Re: Can't continue combos
#4  February 27, 2021, 12:25:35 AM
  • ****
    • Brazil
    • deathscythemugen.neocities.org/
TargetState.

[State 610, TargetState]
type = TargetState
triggerall = NumTarget
trigger1 = !Time
value = 611

Something like that. What it does is you can control how P2 reacts uppon being hit. But you have to create the whole state for it. Look for grabs/throws, they are good examples of custom states.
Re: Can't continue combos
#5  February 27, 2021, 12:35:34 AM
  • *
    • USA
TargetState.

[State 610, TargetState]
type = TargetState
triggerall = NumTarget
trigger1 = !Time
value = 611

Something like that. What it does is you can control how P2 reacts uppon being hit. But you have to create the whole state for it. Look for grabs/throws, they are good examples of custom states.

So basically I have to make a Statedef that's a changestate and have the trigger be getting hit, then have the value of the targetstate be set to the statedef? Sorry, I get the main premise but i'm a teensy weensy bit confused. Also, what would I set the NumTarget as?

DS

Re: Can't continue combos
#6  February 27, 2021, 01:17:45 AM
  • ****
    • Brazil
    • deathscythemugen.neocities.org/
I had to read your post like 10 times to finally understand what you mean lol
But yeah, basically that.

In your attack state (it says jumping strong punch, so let's use this), you will add a targetstate, right after the hitdef. The value is the custom state, in my post I used 611. Then, you will create statedef 611, which will be used by P2. As soon as the hit connects, P2 will be sent to YOUR state 611 instead of a normal hit state.

You can take a look at one of KFM's custom state:

Spoiler, click to toggle visibilty

Notice how it useses movetype = H, indicating the player is being hit, and type = A and not L. In the very end, it uses selfstate to send P2 to it's own gethit states.
Hope it gets a bit easier to understand.
Re: Can't continue combos
#7  February 27, 2021, 09:08:07 AM
  • *
    • USA
I had to read your post like 10 times to finally understand what you mean lol
But yeah, basically that.

In your attack state (it says jumping strong punch, so let's use this), you will add a targetstate, right after the hitdef. The value is the custom state, in my post I used 611. Then, you will create statedef 611, which will be used by P2. As soon as the hit connects, P2 will be sent to YOUR state 611 instead of a normal hit state.

You can take a look at one of KFM's custom state:

Spoiler, click to toggle visibilty

Notice how it useses movetype = H, indicating the player is being hit, and type = A and not L. In the very end, it uses selfstate to send P2 to it's own gethit states.
Hope it gets a bit easier to understand.

Okay, I think I get it. SO, if I make a statedef, make the physics H for gethit and A for air, then make a selfstate controller in that statedef, I can then use the 611 statedef as My value in the target state, hopefully I figured it out. Thanks for the help!
Re: Can't continue combos
#8  February 28, 2021, 06:26:01 AM
  • *
    • USA
Still having problems here. The jump strong punch slams the opponent down, causing them to bounce. I know the concept of targetstate, but I have no idea what sctrl to use on the actual statedef. I've tried selfstate, but I have no clue how that works.

DS

Re: Can't continue combos
#9  March 01, 2021, 03:54:47 AM
  • ****
    • Brazil
    • deathscythemugen.neocities.org/
You're not going to use SelfState right away. You can use whatever you want, maybe some VelSet, maybe some EnvShake, and only at the end you'll use SelfState.
The SelfState will send P2 back to his own GetHit states instead of yours. It's like a ChangeState when you end a move (where you go back to state 0 for example), but used in custom states.
Re: Can't continue combos
#10  March 02, 2021, 03:05:13 PM
  • *
    • USA
You're not going to use SelfState right away. You can use whatever you want, maybe some VelSet, maybe some EnvShake, and only at the end you'll use SelfState.
The SelfState will send P2 back to his own GetHit states instead of yours. It's like a ChangeState when you end a move (where you go back to state 0 for example), but used in custom states.

Okay, thank you. I think I understand it, might take some tinkering but I get the main premise. So, First, I make a statedef that sets the opponents statetype to A, and not L, and the trigger for it would be NumTarget (ID of the hitdef). Then, I make a selfstate that sets the opponent to the state of getting up after they hit the ground. Now that I have my statedef setup, I use a targetstate and set the value to the Number of my statedef, which I tried using 50000 for. Is this somewhat right? any clarification would be appreciated. Also, if anyone knows, what state controller would I use to set my statetype? Statetypeset hasn't exactly worked for me when trying to set it up.
Re: Can't continue combos
#11  March 04, 2021, 08:54:10 PM
  • *****
  • Shame on you!
    • USA
Use the top of the Statedef itself.
[StateDef 210]
type = S   ;<<<statetype
movetype= A
physics = S

I like to use values around the states the special move is in, for the hit reaction. I think that's why 611 was suggested. BUT 611 may mess with some AI. It might think it's doing an air attack. I would suggest using 6000-6999 for hit reactions. Base it off it's 5000-5999 counterpart and you should be able to keep track of it easier.

Also, your particular selfstate probably wont look the best if it goes back to statedef 0. You're going to want the laying down state. 5200?? I cant remember at this moment. Just use Debug, ctrl+d, and trip P2 or get it in the state you want it to switch to. Then use that value.
vVv Mauru Mauru Released vVv
Re: Can't continue combos
#12  March 04, 2021, 08:56:38 PM
  • *
    • USA
Okay, I have one last question which will probably lead me to figuring this out. First of all, I don't know if any of you have answered this and I forgot, but In my Statedef with the Self State, what State Controller would I use to have the opponents statetype change? StateTypeSet doesn't seem to work, and also, what Trigger would I use in that State Controller so that when my hitdef makes contact with the opponent, they change to StateType A and Not L. I have the SelfState down, I just need to know this because with that I can have my opponent change to statetype A and not L, which will hopefully result in me being able to continue a combo. Hopefully my writing isn't too confusing.
Last Edit: March 05, 2021, 01:38:41 AM by Drewism19
Re: Can't continue combos
#13  March 05, 2021, 01:40:01 AM
  • *
    • USA
Also, here's the Statedef I'm working with.
Code:
[Statedef 50000, hit by slam]
type    = A
movetype= H
physics = N

[State 50000, 4] ;Hit ground
type = SelfState
trigger1 = Vel Y > 0
trigger1 = Pos Y >= 0
value = 5100 ;Hit ground

DS

Re: Can't continue combos
#14  March 05, 2021, 06:47:21 AM
  • ****
    • Brazil
    • deathscythemugen.neocities.org/
I like to use values around the states the special move is in, for the hit reaction. I think that's why 611 was suggested. BUT 611 may mess with some AI. It might think it's doing an air attack.

It says jumping strong punch in their post, so I assumed it was an air attack.... If it's not then just change the custom state number...

Also, your particular selfstate probably wont look the best if it goes back to statedef 0. You're going to want the laying down state. 5200?? I cant remember at this moment. Just use Debug, ctrl+d, and trip P2 or get it in the state you want it to switch to. Then use that value.

That one is my fault. State 0 was just used as an example but I should have mention to use the lying down state anyway.



Okay, I have one last question which will probably lead me to figuring this out. First of all, I don't know if any of you have answered this and I forgot, but In my Statedef with the Self State, what State Controller would I use to have the opponents statetype change? StateTypeSet doesn't seem to work, and also, what Trigger would I use in that State Controller so that when my hitdef makes contact with the opponent, they change to StateType A and Not L. I have the SelfState down, I just need to know this because with that I can have my opponent change to statetype A and not L, which will hopefully result in me being able to continue a combo. Hopefully my writing isn't too confusing.

Usually it's StateTypeSet, but I don't see where you're going to use it? You'll probably want everything to be in type = A.
If I understand correctly:
1. the character uses jumping strong punch
2. p2 gets hit, is slammed to the ground
3. while it's bouncing, the character can still hit p2

Is that correct? I'd do something like:
1. Use TargetState on state 610 to send P2 to a custom state.
2. In the custom state (with type = A), either in the beginning of the state or using VelSet, use velocities to make P2 go to the ground
3. Once it hits the ground, send it to another custom state (using ChangeState and still type = A) and this time make the bounce, using more velocities, but sending P2 up this time, and add Gravity or VelAdd to make P2 fall. While it's bouncing you can still hit it.
4. Once it hits the ground again, THEN use SelfState to send them to their lying down state (5100).

It would look like...

Code:
[StateDef 611] ; getting hit by JSP
type = A
physics = N
movetype = H
ctrl = 0
velSet = 3, 3
sprPriority = 2
anim = 611

[State 611, VelAdd] ; gravity
type = VelAdd
Trigger1 = 1
y = 0.5

[State 611, EnvShake]
type = EnvShake
trigger1 = vel y > 0 && pos y >= 0
time = 14
ampl = 4
freq = 120

[State 611, End]
type = ChangeState
trigger1 = vel y > 0 && pos y >= 0
value = 612 ; bouncing

;--------------------
[StateDef 612] ; bouncing
type = A
physics = N
movetype = H
ctrl = 0
velSet = 2, -7
sprPriority = 2
anim = 612

[State 612, VelAdd] ; gravity
type = VelAdd
Trigger1 = 1
y = 0.5

[State 612, End]
type = SelfState
trigger1 = vel y > 0 && pos y >= 0
value = 5100

That's just from the top of my head, may need some work but that's the basic.
Last Edit: March 05, 2021, 06:51:56 AM by DeathScythe
Re: Can't continue combos
#15  March 05, 2021, 01:06:14 PM
  • *
    • USA
This is perfect, Thanks
Re: Can't continue combos
#16  March 06, 2021, 04:17:42 AM
  • *
    • USA
Okay, just an update. It's Working, sorta. I used the code you gave me and it works, but it needs tinkering since the opponent bounces in mid-air, pretty sure it's because the jump strong punch has a pause someplace that I need to find, but it's working and I can hit them after the mid-air bounce.