YesNoOk
avatar

My Okizeme Taunt option doesn't work consistently, what's wrong with its code? (Read 10049 times)

Started by JasonThePhoenix, February 26, 2024, 08:11:44 am
Share this topic:
My Okizeme Taunt option doesn't work consistently, what's wrong with its code?
#1  February 26, 2024, 08:11:44 am
  • **
    • UK
This is the Taunt code, it has a fullscreen hitbox. Taunting an opponent who is knocked down is supposed to take their Super Meter away and give them a chance to get up without getting attacked. However, this is inconsistent. Sometimes the taunt attack hits the foe and subtracts meter and lets my character Taunt again and again. Sometimes the taunt attack fails to hit the downed opponent and my character is hit. It's unreliable. Something must be wrong with the code. I wish I knew what.

This is the Taunt code:
; Taunt
[Statedef 195]
type    = S                      ;State-type: S-stand, C-crouch, A-air, L-liedown
movetype= A                      ;Move-type: A-attack, I-idle, H-gethit
physics = S                      ;Physics: S-stand, C-crouch, A-air
juggle  = 1                      ;Number of air juggle points move takes
velset = 0,0                     ;Set velocity (x,y) (Def: no change)
ctrl = 0                         ;Set ctrl (Def: no change)
anim = 195                       ;Change animation (Def: no change)
poweradd = 0                    ;Power to add (Def: 0)
sprpriority = 2                  ;Set p1's sprite layering priority to 2 (in front)

[State 195, 1]
type = CtrlSet
trigger1 = AnimTime = 0
value = 1

[State 195, 2]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1

[State 195, 3]
type = HitDef
trigger1 = Time = 0
attr = S, NA     
givepower = -1000,0
damage = 0, 0                   ;Damage that move inflicts, guard damage
animtype = Light                 ;Animation type: Light, Medium, Heavy, Back (def: Light)
hitflag = FD                    ;Flags of conditions that move can hit
priority = 3, Hit                ;Attack priority: 0 (least) to 7 (most), 4 default, Hit/Miss/Dodge type (Def: Hit)
pausetime=0,60
guard.pausetime=0, 0
sparkno = 0                      ;Spark anim no (Def: set above)
sparkxy = -40, -304              ;X-offset for the "hit spark" rel. to p2, Y-offset for the spark rel. to p1
hitsound = 0, 0                  ;Sound to play on hit
guardsound = 0, 0                ;Sound to play on guard
ground.type = High               ;Type: High, Low, Trip (def: Normal)
ground.slidetime = 0             ;Time that the opponent slides back
ground.hittime  = 12             ;Time opponent is in hit state
ground.velocity = 0            ;Velocity at which opponent is pushed
air.type = High                  ;Type: High, Low, Trip (def: same as ground.type)
airguard.velocity = 0,0    ;Guard velocity in air (def: (air.xvel*1.5, air.yvel/2))
air.velocity = 0,0          ;X-velocity at which opponent is pushed, Y-velocity at which opponent is pushed
air.hittime = 12                 ;Time before opponent regains control in air
guard.dist = 0

These two attacks are my character's only options for Knocking Down the opponent and making Okizeme happen.

;j5H
[Statedef 630]
type    = A
movetype= A
physics = A
juggle  = 3
poweradd= 150
ctrl = 0
anim = 630
sprpriority = 2

[State 630, 1]
type = PlaySnd
trigger1 = Time = 1
value = 0, 0

[State 630, 2]
type = HitDef
trigger1 = Time = 0
attr = A, NA
damage    = 140*var(42),70
guardflag = HA
priority = 3
pausetime = 18,24;+6
sparkno = 1
sparkxy = -20,-140
hitsound   = 5,0
guardsound = 6,0
ground.type = trip
ground.slidetime = 8
ground.hittime  = 60
ground.velocity = -16
air.velocity = -8,12
air.hittime = 48
guard.dist = 0
fall=1
Fall.Recover = 0

;j2H
[Statedef 640]
type    = A
movetype= A
physics = N
juggle  = 0
poweradd= 150
ctrl = 0
anim = 640
sprpriority = 2

[State 640, 2]
type = PlaySnd
trigger1 = Time = 2
value = 0, 1

[State 640, VelSet]
type = VelSet
trigger1 = animelem = 2
x = 25
y = 25

[State 640, VelSet]
type = VelSet
trigger1 = animelem = 1
x = 0
y = 0

[State 640, 3]
type = HitDef
trigger1 = AnimElem >= 2
attr = A, NA
damage    = 100*var(42),50
guardflag = HA
priority = 4
pausetime = 18,24;+6
sparkno = 1
sparkxy = -10,-40
hitsound   = 5,3
guardsound = 6,0
animtype = Med
ground.type = High
ground.slidetime = 12
ground.hittime  = 15
ground.velocity = -7
air.velocity = -3,12
guard.dist = 0

[State 640, End]
type=ChangeState
trigger1=pos y > -vel y
value=52

By the way VirtualTek Fighter Factory Studio has a typo, try loading a character file that doesn't exist any more and you're told it "doesn't exists".
Re: My Okizeme Taunt option doesn't work consistently, what's wrong with its code?
#2  March 07, 2024, 06:30:02 pm
  • *****
  • Shame on you!
    • USA
Try changing the Juggle = 1 to 0?
The givepower at -1000 might also be an issue? Like if P2 only has 400, mugen might not allow it to happen?

attr = S, NA     ; you might want to make it a special or a hyper?

Try changing the givepower to a smaller number and see if it works more often. Change some of these and keep testing to try and find what's stopping it from working. Use Ctrl+D and C to see the stuff too.
vVv Ryuko718 Updated 10/31/22 vVv
Re: My Okizeme Taunt option doesn't work consistently, what's wrong with its code?
#3  March 08, 2024, 11:20:25 am
  • *****
  • Resident Tosspot
  • Pftheh
    • UK
    • plasmoidthunder.neocities.org
None of that will make a difference.

It's likely a juggle issue and/or the opponent becoming invulnerable; you can check the latter by viewing collisions with Ctrl+C, which will be cyan if they're inv.

Oh, I want a diagram. I fucking love diagrams.
Re: My Okizeme Taunt option doesn't work consistently, what's wrong with its code?
#4  March 28, 2024, 07:41:15 pm
  • **
    • UK
Try changing the Juggle = 1 to 0?
The givepower at -1000 might also be an issue? Like if P2 only has 400, mugen might not allow it to happen?

attr = S, NA     ; you might want to make it a special or a hyper?

Try changing the givepower to a smaller number and see if it works more often. Change some of these and keep testing to try and find what's stopping it from working. Use Ctrl+D and C to see the stuff too.

None of that will make a difference.

It's likely a juggle issue and/or the opponent becoming invulnerable; you can check the latter by viewing collisions with Ctrl+C, which will be cyan if they're inv.

Is the move idea possible in this engine? Should the move's hitbox start faster and last longer if it's supposed to catch grounded foes when they can be hit with OTGs, and aren't getting up invincibly yet?

Ideally the move should end right when the foe is getting up, so this character can't do this AND put out attacks to hit the foe as he's getting up, but this move is inconsistent. Sometimes it works, sometimes it fails to hit, sometimes it works and lets you act again before the foe is up.
Re: My Okizeme Taunt option doesn't work consistently, what's wrong with its code?
#5  March 28, 2024, 11:23:45 pm
  • *****
  • Shame on you!
    • USA
Is the move idea possible in this engine? Should the move's hitbox start faster and last longer if it's supposed to catch grounded foes when they can be hit with OTGs, and aren't getting up invincibly yet?

Ideally the move should end right when the foe is getting up, so this character can't do this AND put out attacks to hit the foe as he's getting up, but this move is inconsistent. Sometimes it works, sometimes it fails to hit, sometimes it works and lets you act again before the foe is up.
I don't see why it wouldn't work. But like PlasmoidThunder mentioned you want to make sure the move CAN hit P2.
Also if you're trying to time a taunt to end based off of P2, I don't see that in your code. You'll need to check P2's state no and maybe anim.

If you're trying to not let P1 do the move a 2nd time while P2 is getting up, you could make a variable to watch when P2 isn't in a hitstate and reset the var to 0. Then the taunt sets it to 1.


But maybe the animation is too short?
I'd make the animation into 2 parts. Extend the hit, and then have the ending animation. You'd change to the end if the move hits or P2 gets up or due to time.
vVv Ryuko718 Updated 10/31/22 vVv