YesNoOk
avatar

is guard.dist parameter in hitdef broken? (Read 4886 times)

Started by Memo, January 05, 2018, 08:58:09 pm
Share this topic:
is guard.dist parameter in hitdef broken?
#1  January 05, 2018, 08:58:09 pm
  • *****
  • Estoy siempre listo para un desafío.
    • Puerto Rico
    • im41784@yahoo.com
I can't get the guard.dist parameter to work at all in the
Hitdef.   street fighter 4 has guard distance boxes where
If your in its range your char will go into a blocking state
If your holding back during whatever attack the enemy is
Using on you.  Mugen has no such thing but it has the
Guard.dist option in the hitdef, reading about it in the docs
It seems it would work the same but no matter what value I put
In it, it wont work. The only thing that actually works in a
Similar manner is the attack.dist parameter under [size] in the CNS
Section of the char but that changes the distance the enemy can
Start blocking at for EVERY attack. I would love to have different
Values for every individual attack, anybody know how to use it,
Or is the fucker really broken how I suspect it to be?
Re: is guard.dist parameter in hitdef broken?
#2  January 05, 2018, 10:38:18 pm
  • ****
  • Robotics Engineer
    • USA
    • altoiddealer@gmail.com
KFM only uses the parameter in his throw attack
Spoiler, click to toggle visibilty

Playing around with it, it seems to have some kind of effect but no, not what I would expect either.

With some testing, it doesn't seem to have any effect on the "InGuardDist" trigger either.

I wasn't testing this right... it actually DOES affect the InGuardDist trigger, and the values behave as one would expect.


*Edit*OK, here's what I'm concluding... it works as expected, EXCEPT it seems that MUGEN is hardcoded to put the player into State 120 (Guard Start) if within the attack.dist
So if guard.dist is included in the HitDef, the !InGuardDist trigger in State 120 will immediately send you into State 140 (Guard Stop).
Seems like it just screws up the animations and you still guard, though.

It's unfortunate that guard.dist does not override the attack.dist in the players constants.

Last Edit: January 05, 2018, 10:56:12 pm by altoiddealer
Re: is guard.dist parameter in hitdef broken?
#3  January 05, 2018, 11:10:19 pm
  • ****
    • USA
    • twitter.com/inktrebuchet
I was hoping this would lead somewhere...

I brought up something similar here but nothing helpful came of it either.
Re: HitDef (SCTRLs)


It kills me that a character will not walk backwards when a projectile is thrown at them!! Or even a Light punch in some cases.
Re: is guard.dist parameter in hitdef broken?
#4  January 05, 2018, 11:29:20 pm
  • *****
  • Estoy siempre listo para un desafío.
    • Puerto Rico
    • im41784@yahoo.com
Ive been using the attack.dist parameter just to avoid those
Dumb instances where you start blocking from half a screen
Away but it would of been great, possibly a game changer in
Mugen Ai coding (Ink I never thought of it being used In that
manner!) but I guess its one of those things that elecbyte never
Prioritized when building 1.1.

Its a shame we've had what, 4 major mugen releases (dos,win,1.0,1.1)
And its still broke!
Hopefully we find a workaround for this like the other bugs in mugen
We've been able to circumvent.
Re: is guard.dist parameter in hitdef broken?
#5  January 05, 2018, 11:40:49 pm
  • **
    • France
Whenever P1 throws out an attack, P2 will get into his guard state when he's holding back while in a specific range.
This is often called "proximity guard", and the range of this mechanic may vary in different games.

And indeed, there are 2 ways to implement it in Mugen from what I know :
a common value which will be used by default for all attacks --> attack.dist in the constants
a value which can overwrite the default one --> guard.dist in the hitdefs

There is also the proj.attack.dist parameter in the constants.
You may find it "broken" as it prevents P2 from moving back, but that's part of how zoning characters force their opponents to be more aggressive and find their way in.

From what I've tested, just make sure your attack.dist is the lower possible (regarding your character), then use an appropriate value for guard.dist in your hitdefs when you need more range. Also if you use mugen's default projectiles, adapt the proj.attack.dist to your projectiles.
- samurais, swords & stuff ? → Another Blade
Re: is guard.dist parameter in hitdef broken?
#6  January 05, 2018, 11:52:48 pm
  • ****
    • USA
    • twitter.com/inktrebuchet
I re-read your original post Memo. Guard.dist is the distance at which the enemy can begin guarding your attack. I’m assuming attack.dist can mess this up though, as the post above explains.

This should work with (your character) vs (your character) but vs other characters will cause your character to guard early. Because most characters seem to have the same guard.dist for every move.
Re: is guard.dist parameter in hitdef broken?
#7  January 06, 2018, 12:35:03 am
  • *****
  • Estoy siempre listo para un desafío.
    • Puerto Rico
    • im41784@yahoo.com
If you leave attack.dist on -1 it will read the values
Posted on guard.dist, just tested it out but it looks
Buggy the way the enemy snaps into a block state.
I got it working a bit, I'll continue to test this out