YesNoOk
avatar

Holding back during guard stun causes a change in speed? (Read 12180 times)

Started by SaltAddict, January 18, 2022, 11:36:37 PM
Share this topic:
Holding back during guard stun causes a change in speed?
#1  January 18, 2022, 11:36:37 PM
  • avatar
  • ***
    • Portugal
I've encountered a very strange issue where, when the enemy blocks my attacks and keeps holding the "back" button, the speed at which he travels backwards will be slower and the hitstun even seems shorter. If the enemy releases the "back" key after blocking the attack, then everything works as intended. This happens whatever or not I define any guard.hittime, guard.velocity, etc... paramaters in the hitdef. Tested against himself AND Kung Fu Man.

For what it's worth, I'm using inktrebuchet's code to cancel hit friction on the enemy, but I have another character that uses the exact same code and this issue doesn't happen. I even tried copy-pasting hitdefs between them to rule out any possible causes.

Spoiler, click to toggle visibilty
Re: Holding back during guard stun causes a change in speed?
#2  January 19, 2022, 12:30:35 AM
  • ****
  • it's me
  • Bat's a Wrap.
    • Chile
    • koakoa@jabber.org
    • Skype - koakumadevil69
I'm going on a bit of an assumption here, but I think this is caused by the nonintuitive way the guard parameters work, guard.ctrltime (which would allow you to move while guarding) defaults to the value set by guard.slidetime. guard.hittime, guard.slidetime and guard.ctrltime are all set to the same value in your hitdefs right?
Yeaaaah im shootign ducks wiht the paino
Re: Holding back during guard stun causes a change in speed?
New #3  January 22, 2022, 01:31:51 PM
  • avatar
  • ***
    • Portugal
I'm going on a bit of an assumption here, but I think this is caused by the nonintuitive way the guard parameters work, guard.ctrltime (which would allow you to move while guarding) defaults to the value set by guard.slidetime. guard.hittime, guard.slidetime and guard.ctrltime are all set to the same value in your hitdefs right?

Sorry for such a late reply, but I just got access to my computer to check this. It seems only the hit velocity is affected by holding back, the ctrltime/hittime/slidetime stay the same regardless of what keys the player is holding. Even if I set the guard.velocity manually the enemy can still slow himself down by holding back.

Edit: Pasted the friction cancel code unto a fresh KFM and the same problem happens.

Edit2: I'm pretty sure whats happening is that holding the back button causes the friction to be applied regardless, slowing the enemy down. But I can't see anything in the default guard states or friction cancel itself that would cause this behaviour.
Last Edit: January 22, 2022, 04:30:44 PM by SaltAddict