YesNoOk
avatar

Stopping the slide after the run during crouch attack and damage dampener help (Read 1947 times)

Started by krudelu, December 10, 2017, 09:41:28 pm
Share this topic:
Stopping the slide after the run during crouch attack and damage dampener help
#1  December 10, 2017, 09:41:28 pm
  • **
  • (>owo)><(owo<)
Hello,

Since I have 2 questions at the same time, I'm not sure if I should make 2 separate topics but I'm going to just put them under one post for now

1. I noticed that there are characters that still slide a little bit when doing a crouching move after running. This is also shown in KFM's case. Which parameter or code is responsible for making this happen? I would want the character to stop on a spot when doing crouch attack after running without sliding just like most KOF characters.


2. This is regarding applying damage dampener. I know how to apply basic damage dampener by number of hits. But is there a way to apply the damage dampener based on number of attacks instead? I don't want a multi-hit move's overall damage to get affected by damage dampener based on number of hits, which affects it's supposed damage when done raw.

Also, is there a way to apply minimum scale so that it cannot go below a certain percent to specific moves?
Last Edit: December 20, 2017, 04:19:34 am by krudelu
Re: Stopping the slide after the run during crouch attack and damage dampener help
#2  December 13, 2017, 09:55:34 am
  • *****
  • Shame on you!
    • USA
#1 you'll want to look in states 10 and 11. The character may have a specific custom state used after your running state but I doubt it.
I think adding velset = 0,0 in the [Statedef 10] should work how you want.

#2 If you're talking about P1, you should be able to do that.  I'd imagine you should be able to set up a variable to change when the move hits. It'd switch to the current state number. Then you could increase the damage dampener if the current state doesn't equal the variable. This way it only increases when it's a new state. I think you'd need the damage dampener check to be above the new variable set, otherwise it would always be the same. Making it not increase/broken.

#3 you'd set up to exclude those states in your normal damage dampener. You'd make a second damage dampener the way you want for those specific states. 
vVv Ryuko718 Updated 10/31/22 vVv
Re: Stopping the slide after the run during crouch attack and damage dampener help
#3  December 16, 2017, 12:29:15 am
  • **
  • (>owo)><(owo<)
Now that you mentioned about velset, I just noticed that I could of added that on the attacks themselves. Thanks for letting me know about the velset.

As for damage dampener, I'll be working on it and give it a try so I'll be right back when there's something I'm not sure about
Re: Stopping the slide after the run during crouch attack and damage dampener help
#4  December 17, 2017, 02:37:22 am
  • **
  • (>owo)><(owo<)
Okay, now I'm finally getting the dampener based on number of attacks. Now when I get to helpers that contains hitdef, they don't get affected by damage dampener.

Here are the codes I put in state -3
Code:
[State -3, Attack Scale]
type = AttackMulSet
trigger1 = 1
value = fvar(10)
ignorehitpause = 1

[State -3, Reset var when the opponent recovers]
type = Varset
trigger1 = numenemy
trigger1 = (enemynear,movetype!=H)
trigger2 = !numenemy
fvar(10) = 1
ignorehitpause = 1

And here's the code I put on each state to apply dampener based on number of attacks:
Code:
[State 200, Damage Dampen]
type = varset
trigger1 = movehit
fvar(10) = fvar(10)*0.95
ignorehitpause = 1
persistent = 0

And here's the code I applied on the helper states that have hitdef on them:
Code:
[State 2020, Helper Attack Scale]
type = AttackMulSet
trigger1 = 1
value = root,fvar(10)
ignorehitpause = 1

For some reason, even after I applied the damage dampener code in the helper state, the dampener doesn't work. Is there something that I may be missing that it ends up the helpers with hitdef not being affected by dampener despite putting the code under the helper state?
Last Edit: December 17, 2017, 09:09:39 am by krudelu
Re: Stopping the slide after the run during crouch attack and damage dampener help
#5  December 17, 2017, 11:14:52 pm
  • *****
  • Shame on you!
    • USA
you have
    fvar(10) = fvar(10)*0.95
for normal attacks, but,
    value = root,fvar(10)
for helpers.
Dont you want the *0.95 there?

You may just want to put the root,fvar(10) as the damage value for the hitdef(s).
You may also want to look into how Statedef -2 and Statedef -3 work. Might cut a lot of duplicated code out.
vVv Ryuko718 Updated 10/31/22 vVv
Re: Stopping the slide after the run during crouch attack and damage dampener help
#6  December 18, 2017, 04:15:51 am
  • **
  • (>owo)><(owo<)
Okay, I give adding the root,fvar(10) a try on the helper's hitdef like this
Code:
damage = 190*(root,fvar(10)),31

And I'm getting it's damage to be affected by the dampener without the attackmulset code underneath the helper state that's supposed to rectify how helper with hitdef is not getting affected by attackmulset from state -3.

I only got the idea of applying the attackmulset code with root,fvar(10) underneath the helper from this place
http://mugen.wikia.com/wiki/Damage_Scaling

But it seems unreliable though I get some codes to work

Now, I'm trying to apply damage dampener on helper with hitdef so the next attack after the helper based attack whether it's helper based attack or not get's affected by the dampener:

Code:
[State 2020, Helper Attack Scale]
type = AttackMulSet
trigger1 = 1
value = fvar(10)*0.95
ignorehitpause = 1

OR

Code:
[State 200, Damage Dampen]
type = varset
trigger1 = movehit
fvar(10) = fvar(10)*0.95
ignorehitpause = 1
persistent = 0

I tried to apply these codes under the helper's state so the next attack the combo from the helper based move get's proper damage reduction and it ends up not working.

Do I have to approach it differently when applying proration on helper with hitdefs?

The reason I'm trying to implement the proration code for each attack so I have some control on how much the next attack would get reduced based on which attack hits the p2 before the next attack.
Re: Stopping the slide after the run during crouch attack and damage dampener help
#7  December 18, 2017, 06:31:59 am
  • ****
  • Robotics Engineer
    • USA
    • altoiddealer@gmail.com
Have you tried adding ParentVarSet to the Helper?

fvar(10) = root,fvar(10)*0.95

Re: Stopping the slide after the run during crouch attack and damage dampener help
#8  December 20, 2017, 04:18:51 am
  • **
  • (>owo)><(owo<)
Alright, I gave using the parentvarset sctrl on the helper and I'm getting it to work.

From what I understand as of now, parentvarset works when applying dampener for the helper. while the regular varset is better for the non-helpers with hitdef.

Anyway, thanks guys for the help on teaching me some stuff about dampener application. For now, I'm making use of damage dampener by number of attacks at the moment.

Maybe I might ask more about dampener in the future depending on what I bump into but I'll just make a new thread about it since it might be a while before then

For now, I'll just mark it solved until I end up on something sooner