YesNoOk
avatar

Counter Hit Detection Detecting After Throw Issue (Read 205 times)

Started by Daniel9999999, November 06, 2014, 02:50:11 am
Share this topic:
Counter Hit Detection Detecting After Throw Issue
#1  November 06, 2014, 02:50:11 am
  • ****
  • [MUFFLED ROCK MUSIC PLAYING IN THE DISTANCE]
    • Chile
    • koakoa@jabber.org
In the character me and a friend we're working on, he introduced a counter detection system which works fine, except for one thing:

Here's the code:

Code:
[State -2, VarSet];Checks if opponent is in attack state
type = VarSet
triggerall = numenemy
trigger1 = enemy, movetype = A
;trigger2 = name = "SanaeInHerPeriod"
var(44) = 1
ignorehitpause = 1

[State -2, VarSet];This resets the condition if counter not succesful and succesful
type = VarSet
;triggerall = name != "SanaeInHerPeriod"
triggerall = numenemy
trigger1 = enemy, movetype = I || var(45) >= 1  ;Enemy is Idle | Counter was Succesful
trigger2 = var(45) > 10 && enemy, movetype = H  ;10 ticks passed & enemy is on gethit state
var(44) = 0
ignorehitpause = 1

[State -2, VarSet];Counter Hit Succesful
type = VarSet
trigger1 = var(44) = 1 && movehit ;Counter Check Ok, Move Hit Succesfully.
trigger1 = stateno != [190,199] ;Does not activate during intros.
trigger1 = stateno != [800,899] ;Does not activate during throws.
trigger1 = stateno != [1605,1606]
trigger1 = stateno != [4000,4999]
trigger2 = var(44) = 1 && projhit = 1  ;Counter Check Ok, Projectile Hit Succesfully.
var(45) = 1
ignorehitpause = 1

[State -2, VarAdd];Counter Hit Timer
type = VarAdd
trigger1 = var(45) >= 1 ;Counter was succesful
var(45) = 1
ignorehitpause = 1

[State -2, VarSet];Counter Hit Reset
type = VarSet
trigger1 = var(45) >= 22 && movehit ;Reset if 22 ticks passed and move hit
trigger2 = p2movetype != H ;Reset if P2 is no longer in gethit state
trigger3 = movetype = H ;Reset if P1 is getting hit
trigger4 = var(45) >= 22 && projhit = 1 ;Reset if 22 ticks passed and projectile hit
var(45) = 0
ignorehitpause = 1

[State -2, Counterhit Explod]
type = Helper;Explod
triggerall = stateno != [800,899] ;Does not activate during throws.
triggerall = stateno != [950,951] ;Don't activate during throws.
triggerall = stateno != [1605,1606]
triggerall = stateno != [4000,4999]
triggerall = !enemynear,movereversed
triggerall = var(44) = 1; && name != "SanaeInHerPeriod"
triggerall = enemy,movetype = H ;Enemy was indeed HIT, otherwise this'd be retarded.
;triggerall = NumHelper(22000) = 0;numexplod(980)+numexplod(981)=0
trigger1 = movehit ;Move hits
trigger2 = projhit = 1 ;Projectile Hits
helpertype = normal
name = "Counter Suwako Kanako"
ID = 22000
stateno = 22000
pos = 0,0
postype = p1
facing = 1
keyctrl = 0
ownpal = 1
supermovetime = 99999999
pausemovetime = 99999999
ignorehitpause = 1

Here's the Issue (I did not take the screenshots in order but the issue is present in that order):
P2 does an attack

Throwing P2 during his attack

Hitting P2 after the throw before he hits the ground (it allows comboing after it) after the throw and BAM there goes the counter hit.


Keep in mind, these counter detections are used for counterbuffs too, so I need this system to work perfectly to not reward counterbuffs when it shouldn't.
Re: Counter Hit Detection Detecting After Throw Issue
#2  November 06, 2014, 08:44:04 am
  • ***
    • USA
Could you add a
[State 0, HitAdd]
type = HitAdd
trigger1 = time = 0
value = 1

To state 810? Maybe that would activate it?
You might need to change the time = 0 to animelem = 1 or something IN the move to make it work too.
           
Re: Counter Hit Detection Detecting After Throw Issue
#3  November 06, 2014, 05:09:27 pm
  • ****
  • [MUFFLED ROCK MUSIC PLAYING IN THE DISTANCE]
    • Chile
    • koakoa@jabber.org
Actually my friend got it fixed over night, it was quite simple, instead of using var(44)=1 as counter detection, we just had to use var(45)>=1 instead.

Go figure.
Re: Counter Hit Detection Detecting After Throw Issue
#4  November 06, 2014, 06:44:14 pm
  • *****
  • Mega Klinklang confirmed
    • USA
    • ricepigeon.webs.com
Thats what I get for having to reassign variable numbers in order to make sure we're using vars that havent already been used but yeah, the issue's resolved for now. (now we just need to get it working for the projectiles as well).

<<-- Updated 09/14/14

You limit yourself so badly when you try to avoid variables. When you get over your fear of the "complexity" of variables, you will find yourself in a better place: A beautiful world where coding is actually fun.