YesNoOk
avatar

P2Dist x bug in 1.0? (Read 3997 times)

Started by Jmorphman, June 25, 2010, 12:12:38 pm
Share this topic:
Re: PlayerPush and ground.type
#21  July 02, 2010, 01:26:13 am
  • ******
  • Legendary XIII
  • I am the eye of the storm to come!
    • New Zealand
    • network.mugenguild.com/cyanide/
Missing the p2facing bit.


In M.U.G.E.N there is no magic button

They say a little knowledge is a dangerous thing, but it's not one half so bad as a lot of ignorance.
Re: PlayerPush and ground.type
#22  July 02, 2010, 01:35:01 am
  • ******
  • If you’re gonna reach for a star...
  • reach for the lowest one you can.
    • USA
    • network.mugenguild.com/jmorphman
Missing the p2facing bit.
That fixed it!  ;D

EDIT: In case anyone cares, here are the updated HitDefs:

Code:
[State 1230, HitDef: Opponent In front]
type = HitDef
trigger1 = AnimElem = 9 || AnimElem = 14 || AnimElem = 17 || AnimElem = 22
trigger1 = !var(16) && (var(15) < 4 || var(20))
trigger1 = P2Dist x >= 0
ID = 1230
attr = S, SA
hitFlag = MAF
guardFlag = M
priority = 4, Hit
damage = ceil(ifElse(fvar(11) * 28 < 7, 7, fvar(11) * 28)), 7
getPower = ifElse(!var(13), 144, 72) * !var(20), 36 * !var(20)
givePower = 36, 36
pauseTime = ifElse(var(20), 6, 12), ifElse(var(20), 6, 12)
guard.pauseTime = ifElse(var(20), 6, 12), ifElse(var(20), 6, 12)
animType = Hard
air.animType = DiagUp
fall.animType = DiagUp
ground.type = High
air.type = Low
ground.hitTime = 18
ground.slideTime = 18
guard.hitTime = 18
air.hitTime = 120
ground.velocity = (P2Dist x + 40) / 4,0
ground.cornerPush.velOff = 0
guard.velocity = -10.52
guard.cornerPush.velOff = 0
air.velocity = 4.32, -7.49
air.cornerPush.velOff = 0
yAccel = 0.58
fall = 0
air.fall = 1
fall.recover = 0
fall.recoverTime = 120
forceStand = 1
hitSound = -1 + 0 * (var(31) := 5)
guardSound = -1 + 0 * (var(32) := 0)
sparkNo = -1 + 0 * (var(33) := 8013)
guard.sparkNo = -1 + 0 * (var(34) := 8001)
sparkXY = -10 + 0 * (var(35) := 61), var(36) := -80
palFX.time = 12 * var(9)
palFX.add = 255, 255, 255
palFX.sinAdd= -255, -255, -255, 48
envShake.time = 14
envShake.ampl = 4
envShake.freq = 120
p2Facing = -1

[State 1230, HitDef: Opponent Behind]
type = HitDef
trigger1 = AnimElem = 9 || AnimElem = 14 || AnimElem = 17 || AnimElem = 22
trigger1 = !var(16) && (var(15) < 4 || var(20))
trigger1 = P2Dist x < 0
ID = 1231
attr = S, SA
hitFlag = MAF
guardFlag = M
priority = 4, Hit
damage = ceil(ifElse(fvar(11) * 28 < 7, 7, fvar(11) * 28)), 7
getPower = ifElse(!var(13), 144, 72) * !var(20), 36 * !var(20)
givePower = 36, 36
pauseTime = ifElse(var(20), 6, 12), ifElse(var(20), 6, 12)
guard.pauseTime = ifElse(var(20), 6, 12), ifElse(var(20), 6, 12)
animType = Hard
air.animType = DiagUp
fall.animType = DiagUp
ground.type = High
air.type = Low
ground.hitTime = 18
ground.slideTime = 18
guard.hitTime = 18
air.hitTime = 120
ground.velocity = (P2Dist x - 40) / 4,0
ground.cornerPush.velOff = 0
guard.velocity = -10.52
guard.cornerPush.velOff = 0
air.velocity = -4.32, -7.49
air.cornerPush.velOff = 0
yAccel = 0.58
fall = 0
air.fall = 1
fall.recover = 0
fall.recoverTime = 120
forceStand = 1
hitSound = -1 + 0 * (var(31) := 5)
guardSound = -1 + 0 * (var(32) := 0)
sparkNo = -1 + 0 * (var(33) := 8013)
guard.sparkNo = -1 + 0 * (var(34) := 8001)
sparkXY = -10 + 0 * (var(35) := -61), var(36) := -80
palFX.time = 12 * var(9)
palFX.add = 255, 255, 255
palFX.sinAdd= -255, -255, -255, 48
envShake.time = 14
envShake.ampl = 4
envShake.freq = 120
p2Facing = 1

[State 1230, HitDef: Final Hit, Opponent In front]
type = HitDef
trigger1 = AnimElem = 25
trigger1 = !var(16) && (var(15) < 5 || var(20))
trigger1 = P2Dist x >= 0
ID = 1232
attr = S, SA
hitFlag = MAF
guardFlag = M
priority = 4, Hit
damage = ceil(ifElse(fvar(11) * 28 < 7, 7, fvar(11) * 28)), 7
getPower = ifElse(!var(13), 144, 72) * !var(20), 36 * !var(20)
givePower = 36, 36
pauseTime = ifElse(var(20), 6, 12), ifElse(var(20), 6, 12)
guard.pauseTime = ifElse(var(20), 6, 12), ifElse(var(20), 6, 12)
animType = DiagUp
air.animType = DiagUp
fall.animType = DiagUp
ground.type = High
air.type = Low
ground.hitTime = 18
ground.slideTime = 18
guard.hitTime = 18
air.hitTime = 120
ground.velocity = -4.32, -7.49
ground.cornerPush.velOff = 0
guard.velocity = -10.52
guard.cornerPush.velOff = 0
air.velocity = -4.32, -7.49
air.cornerPush.velOff = 0
yAccel = 0.58
fall = 1
fall.recover = 0
fall.recoverTime = 120
forceStand = 1
hitSound = -1 + 0 * (var(31) := 5)
guardSound = -1 + 0 * (var(32) := 0)
sparkNo = -1 + 0 * (var(33) := 8013)
guard.sparkNo = -1 + 0 * (var(34) := 8001)
sparkXY = -10 + 0 * (var(35) := 61), var(36) := -80
palFX.time = 12 * var(9)
palFX.add = 255, 255, 255
palFX.sinAdd= -255, -255, -255, 48
envShake.time = 14
envShake.ampl = 4
envShake.freq = 120

[State 1230, HitDef: Final Hit, Opponent Behind]
type = HitDef
trigger1 = AnimElem = 25
trigger1 = !var(16) && (var(15) < 5 || var(20))
trigger1 = P2Dist x < 0
ID = 1232
attr = S, SA
hitFlag = MAF
guardFlag = M
priority = 4, Hit
damage = ceil(ifElse(fvar(11) * 28 < 7, 7, fvar(11) * 28)), 7
getPower = ifElse(!var(13), 144, 72) * !var(20), 36 * !var(20)
givePower = 36, 36
pauseTime = ifElse(var(20), 6, 12), ifElse(var(20), 6, 12)
guard.pauseTime = ifElse(var(20), 6, 12), ifElse(var(20), 6, 12)
animType = DiagUp
air.animType = DiagUp
fall.animType = DiagUp
ground.type = High
air.type = Low
ground.hitTime = 18
ground.slideTime = 18
guard.hitTime = 18
air.hitTime = 120
ground.velocity = 4.32, -7.49
ground.cornerPush.velOff = 0
guard.velocity = -10.52
guard.cornerPush.velOff = 0
air.velocity = -4.32, -7.49
air.cornerPush.velOff = 0
yAccel = 0.58
fall = 1
fall.recover = 0
fall.recoverTime = 120
forceStand = 1
hitSound = -1 + 0 * (var(31) := 5)
guardSound = -1 + 0 * (var(32) := 0)
sparkNo = -1 + 0 * (var(33) := 8013)
guard.sparkNo = -1 + 0 * (var(34) := 8001)
sparkXY = -10 + 0 * (var(35) := -61), var(36) := -80
palFX.time = 12 * var(9)
palFX.add = 255, 255, 255
palFX.sinAdd= -255, -255, -255, 48
envShake.time = 14
envShake.ampl = 4
envShake.freq = 120
Last Edit: July 03, 2010, 03:53:44 am by Brak's Dad
P2Dist x bug in 1.0?
#23  July 24, 2010, 12:29:42 pm
  • ******
  • If you’re gonna reach for a star...
  • reach for the lowest one you can.
    • USA
    • network.mugenguild.com/jmorphman
The issue I'm having only happens in 1.0; basically I have an attack that's similar to the EX Spinning Bird Kick I previously posted about (the attack is Hosenka, Chun-Li's SFIV Ultra 1, BTW). I have two HitDefs for the final kick she delivers while performing a spinning bird kick, and the opponent's P2Dist x determines which HitDef activates. This all works fine in WinMUGEN, but in 1.0, the wrong HitDef activates; for example, if the opponent is behind Chun-Li, the HitDef for an opponent in front of Chun-Li will activate. This of course sends the opponent in the opposite direction I want him to go in and the rest of the attack fails to connect. However, if Chun-Li's FrontEdgeDist is less than 30 or so, the attack behaves normally. I'm stumped.

The relevant HitDef's:
Spoiler, click to toggle visibilty
Re: P2Dist x bug in 1.0?
#24  July 24, 2010, 12:49:23 pm
  • ******
  • Legendary XIII
  • I am the eye of the storm to come!
    • New Zealand
    • network.mugenguild.com/cyanide/
My guess right here is. Mugen is being stupid. The only time i have ever had p2dist be a case sensitive trigger was in a hitdef. When using p2dist x, it didn't work, p2dist X however did. Also, drop the spaces

trigger1 = p2dist X>= 0

trigger1 = p2dist X< 0

That's all i can think of right now. They look right otherwise. In terms of testing, does it work as mostly expected if you null one hitdef and the p2dist trigger? Like, always always forwards/backwards depending on what you nulled?


In M.U.G.E.N there is no magic button

They say a little knowledge is a dangerous thing, but it's not one half so bad as a lot of ignorance.
Re: P2Dist x bug in 1.0?
#25  July 24, 2010, 01:03:40 pm
  • ******
  • If you’re gonna reach for a star...
  • reach for the lowest one you can.
    • USA
    • network.mugenguild.com/jmorphman
My guess right here is. Mugen is being stupid. The only time i have ever had p2dist be a case sensitive trigger was in a hitdef. When using p2dist x, it didn't work, p2dist X however did.
???

That's all i can think of right now. They look right otherwise. In terms of testing, does it work as mostly expected if you null one hitdef and the p2dist trigger? Like, always always forwards/backwards depending on what you nulled?
Yeah. Incidentally, in the process of testing that out, I found that something similar happens in the Spinning Bird Kick hits before that final one. Near the edge of the screen, the wrong HitDef activates on the ninth Spinning Bird Kick hit, but the correct ones activate on the remaining two hits.
Re: P2Dist x bug in 1.0?
#26  July 24, 2010, 01:28:30 pm
  • ******
  • Legendary XIII
  • I am the eye of the storm to come!
    • New Zealand
    • network.mugenguild.com/cyanide/
I would say you're getting the right actions when the frontedgedist is small because p2 is getting the opposite behaviour expected.

Does it function differently if you remove the spaces and uppercase the X's. I have seen that before and it has been mentioned on the elecbyte forums somewhere.


In M.U.G.E.N there is no magic button

They say a little knowledge is a dangerous thing, but it's not one half so bad as a lot of ignorance.
Re: P2Dist x bug in 1.0?
#27  July 24, 2010, 01:36:24 pm
  • ******
  • If you’re gonna reach for a star...
  • reach for the lowest one you can.
    • USA
    • network.mugenguild.com/jmorphman
Does it function differently if you remove the spaces and uppercase the X's. I have seen that before and it has been mentioned on the elecbyte forums somewhere.
Nope.
Re: P2Dist x bug in 1.0?
#28  July 24, 2010, 11:49:25 pm
  • ******
  • Legendary XIII
  • I am the eye of the storm to come!
    • New Zealand
    • network.mugenguild.com/cyanide/
Lets try it differently then.

Remove a hitdef and swap your fields based on p2dist X.

air.velocity = ifelse(p2dist X>= 0, 1,-1)
p2facing = ifelse(p2dist X>= 0,1,-1)

etc. You don't have too many fields that are different.


In M.U.G.E.N there is no magic button

They say a little knowledge is a dangerous thing, but it's not one half so bad as a lot of ignorance.
Re: P2Dist x bug in 1.0?
#29  July 25, 2010, 02:53:26 am
  • ******
  • If you’re gonna reach for a star...
  • reach for the lowest one you can.
    • USA
    • network.mugenguild.com/jmorphman
Lets try it differently then.

Remove a hitdef and swap your fields based on p2dist X.

air.velocity = ifelse(p2dist X>= 0, 1,-1)
p2facing = ifelse(p2dist X>= 0,1,-1)

etc. You don't have too many fields that are different.
Didn't help.

When everything is reversed (AKA, have the opponent front hitdef activate when the opponent is behind, and vice-versa) it works as expected, except when near a corner. I could always code a workaround that, though, and have it behave normally within a certain distance of a corner.
Re: P2Dist x bug in 1.0?
#30  July 25, 2010, 03:13:27 am
  • ******
  • Legendary XIII
  • I am the eye of the storm to come!
    • New Zealand
    • network.mugenguild.com/cyanide/
p2dist X>= -10

?? this sounds to me like when you're in the corner things are mashing up a bit and the axis are crossing, turn on clsn and see if you can check.


In M.U.G.E.N there is no magic button

They say a little knowledge is a dangerous thing, but it's not one half so bad as a lot of ignorance.
Re: P2Dist x bug in 1.0?
#31  July 25, 2010, 03:27:48 am
  • ******
  • If you’re gonna reach for a star...
  • reach for the lowest one you can.
    • USA
    • network.mugenguild.com/jmorphman
p2dist X>= -10

?? this sounds to me like when you're in the corner things are mashing up a bit and the axis are crossing, turn on clsn and see if you can check.
Sorry, I don't quite understand your meaning.
Re: P2Dist x bug in 1.0?
#32  July 25, 2010, 03:39:10 am
  • ******
  • Legendary XIII
  • I am the eye of the storm to come!
    • New Zealand
    • network.mugenguild.com/cyanide/
I have no idea what's going wrong. Hence it's less a case of trying to figure it out and more a case of sorting out what simple thing can we do to fix it.

Try using p2dist X>= -10 instead of >= 0. The turn on clsn's is to check where p2's axis is in relation to your own in the corner, it might provide some clues as to why the wrong hitdef triggers.


In M.U.G.E.N there is no magic button

They say a little knowledge is a dangerous thing, but it's not one half so bad as a lot of ignorance.
Re: P2Dist x bug in 1.0?
#33  July 25, 2010, 03:51:58 am
  • ******
  • If you’re gonna reach for a star...
  • reach for the lowest one you can.
    • USA
    • network.mugenguild.com/jmorphman
Hmm... everything seems to be normal with regards to the axes. There doesn't seem to be any reason why the wrong hitdef triggers.
Re: P2Dist x bug in 1.0?
#34  July 25, 2010, 04:44:52 am
  • ******
  • Legendary XIII
  • I am the eye of the storm to come!
    • New Zealand
    • network.mugenguild.com/cyanide/
Quote from elecbyte
Quote
- "P2BodyDist X = [-20,20]" trigger incorrectly returns 1 if both characters standing at their end of the screen while parts of their bodies/clsn are out of the screen as shown, or if the enemy is getting hit while half of his body is outside of the screen
Related? Time for some displaytoclipboard. Also pause and stepframe.

As none of the trigger swaps work we kinda need to sort out what is going wrong now.


In M.U.G.E.N there is no magic button

They say a little knowledge is a dangerous thing, but it's not one half so bad as a lot of ignorance.
Re: P2Dist x bug in 1.0?
#35  July 25, 2010, 05:57:46 am
  • ******
  • If you’re gonna reach for a star...
  • reach for the lowest one you can.
    • USA
    • network.mugenguild.com/jmorphman
Quote from elecbyte
Quote
- "P2BodyDist X = [-20,20]" trigger incorrectly returns 1 if both characters standing at their end of the screen while parts of their bodies/clsn are out of the screen as shown, or if the enemy is getting hit while half of his body is outside of the screen
Related? Time for some displaytoclipboard. Also pause and stepframe.

As none of the trigger swaps work we kinda need to sort out what is going wrong now.
I just checked, and the P2dist that is displayed on the clipboard seems to correspond to where the opponent is relative to Chun-Li, but for whatever reason the wrong HitDef is triggered. :S
Re: P2Dist x bug in 1.0?
#36  July 25, 2010, 06:13:34 am
  • ******
  • Legendary XIII
  • I am the eye of the storm to come!
    • New Zealand
    • network.mugenguild.com/cyanide/
Either i need to download this and try it myself, or it's to do with triggering 2 hitdefs on the same tick.

Try

animelemtime(49) = 0 for one and animelemtime(49) = 1 for the other. After that i'm really out of ideas. And short of defining P2's position prior to the hit with a variable, i can't think of much else you could do to fix it.


In M.U.G.E.N there is no magic button

They say a little knowledge is a dangerous thing, but it's not one half so bad as a lot of ignorance.
Re: P2Dist x bug in 1.0?
#37  July 25, 2010, 06:24:56 am
  • ******
  • If you’re gonna reach for a star...
  • reach for the lowest one you can.
    • USA
    • network.mugenguild.com/jmorphman
Re: P2Dist x bug in 1.0?
#38  July 25, 2010, 07:39:07 am
  • ******
  • Legendary XIII
  • I am the eye of the storm to come!
    • New Zealand
    • network.mugenguild.com/cyanide/
Umm. I get the whole attack connecting no matter what. Admittably around about animelem 33 p2 goes in the same direction twice, but it still finishes the attack. All i can think of in that situation is that the hitdef is turned on when p2 is behind you and then it hits once they're in front.

Moved some hitboxes round, changed it to animelem = 34, i now get it on a later frame with p2 going the same direction twice, However at no point am i actually missing. Swapping to animelem = 34 made p2 guarantee to go forwards. 33 = backwards.

i am unsure which direction is correct, but it's not missing chun li at all. Works ok on KFM as well. So, either i've missed something, or you're not on RC8


In M.U.G.E.N there is no magic button

They say a little knowledge is a dangerous thing, but it's not one half so bad as a lot of ignorance.
Re: P2Dist x bug in 1.0?
#39  July 25, 2010, 07:46:40 am
  • ******
  • If you’re gonna reach for a star...
  • reach for the lowest one you can.
    • USA
    • network.mugenguild.com/jmorphman
Umm. I get the whole attack connecting no matter what. Admittably around about animelem 33 p2 goes in the same direction twice, but it still finishes the attack. All i can think of in that situation is that the hitdef is turned on when p2 is behind you and then it hits once they're in front.

Moved some hitboxes round, changed it to animelem = 34, i now get it on a later frame with p2 going the same direction twice, However at no point am i actually missing. Swapping to animelem = 34 made p2 guarantee to go forwards. 33 = backwards.

i am unsure which direction is correct, but it's not missing chun li at all. Works ok on KFM as well. So, either i've missed something, or you're not on RC8
Wait, you're getting the full 21 hits? I just tried it on KFM in stage0 and only got 20.
Re: P2Dist x bug in 1.0?
#40  July 25, 2010, 08:21:47 am
  • ******
  • Legendary XIII
  • I am the eye of the storm to come!
    • New Zealand
    • network.mugenguild.com/cyanide/
It worked, then it broke, then i removed my animelem = 34 stuff and it worked again.

I am currently getting a reliable 21 hits with your current settings, although i did change the triggers on the big hitdef to look like

Quote
triggerall = !var(16) && (var(15) < 11 || var(20))
triggerall = P2Dist X< 0
trigger1 = AnimElem = 9 || AnimElem = 14 || AnimElem = 17
trigger2 = AnimElem = 22 || AnimElem = 25 || AnimElem = 30
trigger3 = AnimElem = 33 || AnimElem = 38 || AnimElem = 41
trigger4 = AnimElem = 46
Which i find easier to read. But no other changes.


In M.U.G.E.N there is no magic button

They say a little knowledge is a dangerous thing, but it's not one half so bad as a lot of ignorance.