YesNoOk
avatar

NOT Super Armor & Focus Atk Problem; hit priority maybe??? (Read 3537 times)

Started by MDCGD, August 09, 2020, 06:08:55 am
Share this topic:
NOT Super Armor & Focus Atk Problem; hit priority maybe???
#1  August 09, 2020, 06:08:55 am
  • avatar
  • **
    • USA
Hello fellow creators.

OK. first problem is regarding Super Armor. I have a character that has super armor only on certain attacks. When I test my character with AI on P1 & P2 and they both do the same attack at the same time that has armor, they don't (brickwall) hit each other. They just finish the animation. In other words...if two characters have super armor and attack each other at the same time, it cancels out with no hits no brickwall effect (looks like if movetype is not set to H in statedef). BTW I'm not using the Helper method, I'm using the var method. and should I switch to the Helper method instead for the Armor Mechanics I'm going for?

Second problem is Focus Attack. When my character attempts to charge and gets hit, he doesn't absorb it he just gets hit as if no Focus Armor. I copied the code exact (only adjusted minor things to conform to my character like effects,damage, variables already used (and yes I proofread the variables), etc).

Help would be greatly appreciated.
Follow Twitter: @MVDCGD
Subscribe Youtube: MVDCGD
Last Edit: December 09, 2020, 06:08:28 pm by MDCGD
Re: Super Armor & Focus Atk Problem
#2  August 09, 2020, 07:31:46 am
  • ******
  • Hedgehog Whisperer
  • Red Bull addict
    • Spain
    • xgargoyle.mgbr.net
Can you post the "var method" code of your super armor? The description you gave is pretty vague...

For the second problem, you will also have to post the code you are using. We need to understand how you are attempting to do the superarmor
XGargoyle: Battle posing since 1979
http://xgargoyle.mgbr.net
http://www.pandorabots.com/pandora/talk?botid=e71c0d43fe35093a  <-- Please click that link
http://paypal.me/XGargoyle  <-- Donations welcome!
Re: Super Armor & Focus Atk Problem
#3  August 09, 2020, 10:47:31 am
  • avatar
  • **
    • USA
Can you post the "var method" code of your super armor? The description you gave is pretty vague...

For the second problem, you will also have to post the code you are using. We need to understand how you are attempting to do the superarmor

Ok. Since I'm posting my code let me explain in more detail:

I (attempted to) created 3 levels of Super Armor for my character.
LV 1 are attacks That are resilient to Normal attacks
LV 2 are attacks resilient to Normal & Special attacks
LV 3 are attacks resilient to All attacks

here's the -3 Stuff
Spoiler, click to toggle visibilty

Here's the Custom state Each hitoverride sends my player to:
Spoiler, click to toggle visibilty

and each attack state I wanted Armor on I applied in statedef

velset = (prevstateno = [whateverarmorstateno])* 0,(prevstateno = [whateverarmorstateno])* 0
facep2 = !(prevstateno = [whateverarmorstateno])

took out anim and used changeanim

[State 701, ChangeAnim]
type = ChangeAnim
trigger1 = animelemtime (0) = 0 && anim != [currentstateno]
value = [desiredanim]

and used animelemtime instead of time everywhere needed.

Annnd....here's the Focus:
Spoiler, click to toggle visibilty

If you spot anything else that might be off aside from my complaint let me know. It may work fine now, and then later a new issue may arrive out of nowhere.
Follow Twitter: @MVDCGD
Subscribe Youtube: MVDCGD
Re: Super Armor & Focus Atk Problem
#4  August 13, 2020, 02:39:18 am
  • *****
  • Shame on you!
    • USA
Without digging through the details of your last post,
The double hit at the exact same time, The hitdef jumped to mind.
priority = 3,Hit
Make sure it's not
priority = 3,Miss
or something else. Check out the hitdef info in Mugen Class for all the info on that.
vVv Ryuko718 Updated 10/31/22 vVv
Re: Super Armor & Focus Atk Problem
#5  August 13, 2020, 06:25:13 am
  • avatar
  • **
    • USA
Without digging through the details of your last post,
The double hit at the exact same time, The hitdef jumped to mind.
priority = 3,Hit
Make sure it's not
priority = 3,Miss
or something else. Check out the hitdef info in Mugen Class for all the info on that.


That's the first thing I checked. All of my hitdefs are set to "Hit" not "Miss" so its not that.
Follow Twitter: @MVDCGD
Subscribe Youtube: MVDCGD
Re: Super Armor & Focus Atk Problem
#6  November 10, 2020, 07:27:50 am
  • avatar
  • **
    • USA
Ok. So I was busy digging for help on something else and ran into the cause of this problem. Apparently, I was unaware that custom state attacks using p2stateno in the hitdef does not interact with hitoverride. This is the reason why my attacks are passing through. The attacks that are passing through like "Nothitby" are attacks that send you into custom states (i.e. wall bounce, floor bounce, etc). So, NOW, what should I do as an alternative because I need both Super Armor and custom states for my full game???
Follow Twitter: @MVDCGD
Subscribe Youtube: MVDCGD
Re: Super Armor & Focus Atk Problem
#7  November 11, 2020, 03:46:56 am
  • *****
  • Shame on you!
    • USA
vVv Ryuko718 Updated 10/31/22 vVv
Re: Super Armor & Focus Atk Problem
#8  November 11, 2020, 05:16:40 pm
  • avatar
  • **
    • USA
Follow Twitter: @MVDCGD
Subscribe Youtube: MVDCGD
Re: Super Armor & Focus Atk Problem
#9  November 11, 2020, 11:49:15 pm
  • ***
  • Non est hoc propter hoc sed propter est hoc
    • USA
    • doubletrend-zeta.neocities.org/
You want to force the state, correct? Then you'd definitely want a reversal. I am assuming both characters are in an attack state, so both should have red clsns.


Unless I misunderstood your first post, I did the exact thing you're looking for myself. All you have to do is set up a variable or two that confirms 1) that the enemy is movetype=A, and 2) that one of you is on the winning or losing side of the trade. I have a bunch of variables to confirm this for the enemy as I'm not running a fullgame (vars 22 and 16), but all you really need is the sort of binary 1 or - 1 I put in var(25) to determine a winning or losing trade.
Code:
[State p1 powerbreak]
type = ReversalDef
triggerall = var(22) != 1
triggerall = var(16) != 0
trigger1 = var(25) = 1
reversal.attr =
SCA,NA,SA           ;SCA,NA,SA,HA,NP,SP,HP,NT,ST,HT
pausetime = 0,0
sparkno = -1
hitsound = S8001,5
p2stateno = 5075
ignorehitpause = 1

[State p2 powerbreak]
type = ReversalDef
triggerall = var(22) != 1
triggerall = var(16) != 0
trigger1 = var(25) = -1
reversal.attr =
SCA,NA,SA           ;SCA,NA,SA,HA,NP,SP,HP,NT,ST,HT
pausetime = 0,0
sparkno = -1
hitsound = S8001,5
p1stateno = 5075
ignorehitpause = 1
Re: Super Armor & Focus Atk Problem
#10  November 14, 2020, 04:00:28 am
  • avatar
  • **
    • USA
You want to force the state, correct? Then you'd definitely want a reversal. I am assuming both characters are in an attack state, so both should have red clsns.


Unless I misunderstood your first post, I did the exact thing you're looking for myself. All you have to do is set up a variable or two that confirms 1) that the enemy is movetype=A, and 2) that one of you is on the winning or losing side of the trade. I have a bunch of variables to confirm this for the enemy as I'm not running a fullgame (vars 22 and 16), but all you really need is the sort of binary 1 or - 1 I put in var(25) to determine a winning or losing trade.
Code:
[State p1 powerbreak]
type = ReversalDef
triggerall = var(22) != 1
triggerall = var(16) != 0
trigger1 = var(25) = 1
reversal.attr =
SCA,NA,SA           ;SCA,NA,SA,HA,NP,SP,HP,NT,ST,HT
pausetime = 0,0
sparkno = -1
hitsound = S8001,5
p2stateno = 5075
ignorehitpause = 1

[State p2 powerbreak]
type = ReversalDef
triggerall = var(22) != 1
triggerall = var(16) != 0
trigger1 = var(25) = -1
reversal.attr =
SCA,NA,SA           ;SCA,NA,SA,HA,NP,SP,HP,NT,ST,HT
pausetime = 0,0
sparkno = -1
hitsound = S8001,5
p1stateno = 5075
ignorehitpause = 1

At the point when I wrote the first post, I didn't understand what was happening. But now I do. What I've read is that using Targetstate instead of p2stateno in the Hitdef forces the hit and its working....to some extent. what happens NOW is....depending at what frame the attack lands, it completely ignores the Super Armor and sends the character into the custom state. It tolerable though...It could be thought of somewhat of as a critical hit or something.
Follow Twitter: @MVDCGD
Subscribe Youtube: MVDCGD
Re: Super Armor & Focus Atk Problem
#11  November 14, 2020, 04:05:51 am
  • *****
  • Shame on you!
    • USA
When stuff like this happens, I try to make a quick test. I'll exaggerate the animations' timings. like standing light punch will take 2 full seconds to happen with each frame being very pronounced. Then I try all the mixes I can make happen. This way I can SEE what's causing the hiccup. I usually just add one 0 to the end of the timing. So if the frame is 3 tics, it's 30 tics. 5 tics is 50, and so on. Then I just delete all the 0s and it's back to normal.

You might be able to figure out exactly what the issue is.
vVv Ryuko718 Updated 10/31/22 vVv
Re: NOT Super Armor & Focus Atk Problem; hit priority maybe???
#12  December 09, 2020, 06:14:17 pm
  • avatar
  • **
    • USA
When stuff like this happens, I try to make a quick test. I'll exaggerate the animations' timings. like standing light punch will take 2 full seconds to happen with each frame being very pronounced. Then I try all the mixes I can make happen. This way I can SEE what's causing the hiccup. I usually just add one 0 to the end of the timing. So if the frame is 3 tics, it's 30 tics. 5 tics is 50, and so on. Then I just delete all the 0s and it's back to normal.

You might be able to figure out exactly what the issue is.

Solved the issue. It wasn't the hitoverride super armor at all, as I noticed it was happening with attacks not containing super armor. Turns out it was hit priority in the hitdef. I char I used as a base for coding initially had different values for priority depending on the type of attack. After doing research I found that the most convenient method for priority would be to just set all of them as priority = 4,hit. I'll reserve priority 5+ for specific events such as anti-air attacks. Thanks for the all the suggestions everyone.
Follow Twitter: @MVDCGD
Subscribe Youtube: MVDCGD