YesNoOk
avatar

My Okizeme Taunt option doesn't work consistently, what's wrong with its code? (Read 48312 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 N00bSaibot & Muramasa RoofTop 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 N00bSaibot & Muramasa RoofTop vVv
Re: My Okizeme Taunt option doesn't work consistently, what's wrong with its code?
#6  May 19, 2024, 06:27:29 pm
  • *****
  • Thanks and God bless
    • USA
    • ricepigeon.neocities.org
Considering how the only two attacks that can cause a knockdown are both melee attacks, I need to ask: does the character have any projectile attacks?

If not, you should be able to use a targetpoweradd controller (with triggers set up to detect if the enemy is in a liedown state) during the taunt state instead of a hitdef to achieve the intended effect. This has the benefit of not adding additional hitstun or resetting the opponent's hitstates, since you're not using a hitdef. Just make sure you use a variable as a flag that resets when the opponent is not in a knockdown state so you can't continually spam the Taunt to remove more power than intended.

If your character does have projectile moves, are they based on the projectile state controller or are they helper based? If they're the former, you should be able to use the same method as above; if the latter, you'll need to do the same thing, but add in a few complex workarounds to account for each helper projectile. The reason for this is that, when a projectile spawned by the projectile state controller hits an opponent, the root (that is, the player) owns the target, whereas with helper-based projectiles, the helper gains ownership of the target while the root (player) drops it, so using targetpoweradd won't work from the player's states in these situations unless you add in workarounds. This could involve using the targetpoweradd controller from inside the helper states while using trigger redirects to detect if the root (player) is in the taunt state.
Re: My Okizeme Taunt option doesn't work consistently, what's wrong with its code?
#7  June 07, 2024, 07:49:21 pm
  • ******
  • Take better care of the plants around u or become
  • the fertilizer that feeds them.The choice is yours
    • Chile
    • network.mugenguild.com/basara/
hitflag = FD                    ;Flags of conditions that move can hit
Have you tried "hitflag = D+"?? D is only for liedown state and + is for being hit when the enemy is in a gethit state (like 5100s) so then you get sure that if the enemy is down, you can hit it with the taunt. Also, just to be sure, add "fall = 1" to the Hitdef so you can be sure the enemy will got down when you hit with this

Rest in peace, Toriyama-san...
Normal WIPS - ClayFighter - Ideas - Anti-Gouki Project - Lifebars - Facebook - X
Re: My Okizeme Taunt option doesn't work consistently, what's wrong with its code?
#8  June 09, 2024, 12:24:48 pm
  • *****
  • Resident Tosspot
  • Pftheh
    • UK
    • plasmoidthunder.neocities.org
Hitflag has to be at least FD for OTGs to work.

Oh, I want a diagram. I fucking love diagrams.
Re: My Okizeme Taunt option doesn't work consistently, what's wrong with its code?
#9  August 12, 2024, 03:16:14 pm
  • **
    • UK
hitflag = FD                    ;Flags of conditions that move can hit
Have you tried "hitflag = D+"?? D is only for liedown state and + is for being hit when the enemy is in a gethit state (like 5100s) so then you get sure that if the enemy is down, you can hit it with the taunt. Also, just to be sure, add "fall = 1" to the Hitdef so you can be sure the enemy will got down when you hit with this

I changed the hitflag to hitflag = FD+. The taunt's length is still inconsistent and sometimes the foe still doesn't get hit when he should.

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.

I apologize but I do not know how to do that. Are there any existing characters that do this, so I can learn from their code?

Considering how the only two attacks that can cause a knockdown are both melee attacks, I need to ask: does the character have any projectile attacks?

If not, you should be able to use a targetpoweradd controller (with triggers set up to detect if the enemy is in a liedown state) during the taunt state instead of a hitdef to achieve the intended effect. This has the benefit of not adding additional hitstun or resetting the opponent's hitstates, since you're not using a hitdef. Just make sure you use a variable as a flag that resets when the opponent is not in a knockdown state so you can't continually spam the Taunt to remove more power than intended.

If your character does have projectile moves, are they based on the projectile state controller or are they helper based? If they're the former, you should be able to use the same method as above; if the latter, you'll need to do the same thing, but add in a few complex workarounds to account for each helper projectile. The reason for this is that, when a projectile spawned by the projectile state controller hits an opponent, the root (that is, the player) owns the target, whereas with helper-based projectiles, the helper gains ownership of the target while the root (player) drops it, so using targetpoweradd won't work from the player's states in these situations unless you add in workarounds. This could involve using the targetpoweradd controller from inside the helper states while using trigger redirects to detect if the root (player) is in the taunt state.

I'm sorry, I don't understand what you're saying. My character has one projectile.
Re: My Okizeme Taunt option doesn't work consistently, what's wrong with its code?
#10  August 13, 2024, 01:27:28 am
  • ******
  • Take better care of the plants around u or become
  • the fertilizer that feeds them.The choice is yours
    • Chile
    • network.mugenguild.com/basara/
I changed the hitflag to hitflag = FD+. The taunt's length is still inconsistent and sometimes the foe still doesn't get hit when he should.
F is for fall and D is for (lie)down, I recommend you to use LD instead FD, for low and down, maybe that could work

Also, let me translate what Odb and RP said:
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.
-You'll probably needs to get enemy into a custom state when it's hit to get the effect you need, this can be possible adding p2stateno = [state number]
-If the animation is too short, then make 2 states, one for the hitdef and another for the anim of your char when he hits, basically the same as above but with p1stateno = [state] with the anim, and there making more time and maybe the NotHitBy so can't be hit meanwhile you're making the move

Considering how the only two attacks that can cause a knockdown are both melee attacks, I need to ask: does the character have any projectile attacks?

If not, you should be able to use a targetpoweradd controller (with triggers set up to detect if the enemy is in a liedown state) during the taunt state instead of a hitdef to achieve the intended effect. This has the benefit of not adding additional hitstun or resetting the opponent's hitstates, since you're not using a hitdef. Just make sure you use a variable as a flag that resets when the opponent is not in a knockdown state so you can't continually spam the Taunt to remove more power than intended.
[State TPA]
type = TargetPowerAdd
trigger1 = movehit
value = -100
You can use a var(x) as a trigger in case you want something like reset the move so you don't have to spam over and over

Rest in peace, Toriyama-san...
Normal WIPS - ClayFighter - Ideas - Anti-Gouki Project - Lifebars - Facebook - X