P2statetype = A registering as true vs standing opponent that is launched.

Started by kargon, May 27, 2016, 08:36:18 PM

Previous topic - Next topic

kargon

Hi all.

So I created my own juggle system where I add +1 to only hits that strike aerial opponents. Works great except for one small caveat.

I have a move that launches and the code to give it +1 juggle point is still active when hitting an opponent on the ground. This same code works for all other attacks vs air that do not launch vs standing.

Basically, I have a b+H that launches the opponent. If I do it against a standing opponent, it launches and still adds the +1 to my var(13) even though the opponent was standing on initial contact. As a test, I put trigger1 = movecontact && P2statetype != S and the juggle point is still awarded.

Any thoughts? Thanks!

[State 222]
type = VarAdd
trigger1 = movecontact && P2statetype = A
var(13) = 1
ignorehitpause = 0
persistent = 0


Edit: Used a workaround with ID's and two hitdefs. varadd only active with proper ID.

Odb718

I think this comes down to hittime. I may be mistaken, but sometimes movecontact can still trigger as true even after the first initial tic of contact.
So in tic 1 the guy is standing and gets hit. movecontact is good.  <<< doesn't qualify
in tic 2 the guy's state is set into the air and movecontact is good.  <<<qualifies to set the var

I forget exactly how to get the 1 tic response from mugen. but I know it's not too complex. I think you have to check a couple things. But yeah, you need to make sure it's only at that very first tic.
vVv Gouken718 vVv SabreTooth718 vVv



kargon

Hrm. movecontact = 1 didn't work. It just delayed when the juggle point was awarded. Is there a way to only check the trigger for one frame? I also tried movecontact = 3 and  = 5 for the same result. Just longer delayed +1 juggle hit.

Felkazz

That is strange...
MoveContact returns how long the move has been making contact with the target, so, MoveContact = 1 would trigger only in the first frame of contact...
I think your problem is in the IgnoreHitPause = 0, this makes the MoveContact be evaluated only after HitPause ends...

kargon

Very weird. I removed ignorehitpause and still had the same issue. I tried movecontact = 0 (just to try) and it does not award the juggle point on the ground, BUT, it adds the juggle point on the first frame of doing the move against an air opponent, BEFORE contact has been made. In fact, I can launch the enemy and then b+H whiff and still get the +1 juggle point. Very strange.

I mean, movecontact = 0 makes sense as to why it would happen this way, just trying different versions to see what gets closer to the desired functionality.

kargon

I just tried by setting pausetime = 0,0 and it works (though, of course it looks/feels bad). Getting somewhere. Tried ignorehitpause = 0 again with the same result as before. Interesting.

Felkazz

Yeah, MoveContact = 0 means the move hasn't made contact yet...
But it is strange that MoveContact = 1 doesn't work...
Try to use IgnoreHitPause = 1

kargon

This is where it gets weird.

I changed the pausetime to 35,35 to see when the point was being awarded. With ignorehitpause = 0, it was awarded after the hitpause. With ignorehitpause = 1, it was awarded before the hitpause... but still awarded.

The only time it isn't awarded is if pausetime = 0,0.

This is very strange.

kargon

If I set pausetime = 1, 15 (or pausetime = 0,15) it works. 2/15 or any other # above 1 for my own pausetime causes it to award the juggle point immediately. Still strange!

Odb718

So with movecontact = 1 the launcher is still setting the value?
Make two hitdefs in the launcher state. One for enemies in the air, one for on the ground. Make either one have a hit ID number. Check that number in your varset. You might be able to make 1 hitdef and use something like ID = ifelse(P2statetype=A,777,9). Then you'd check to see if the ID was in the air or not.
vVv Gouken718 vVv SabreTooth718 vVv


kargon

Hrm. Good suggestions.

First one didn't work. I put 2 hitdefs in. I added id = 1313 to the one that hits air. And I changed the juggle point trigger to:

[State 240]
type = VarAdd
trigger1 = movecontact = 1
trigger1 = id = 1313
var(13) = 1
ignorehitpause = 1
persistent = 0


As soon as I added the second hitdef (with hitflag = AF), the one above it (with hitflag = M) stopped hitting. The moment I take the second hit-def out, it works.

Secondly, if I launch the opponent with another launcher, and then do the move, the second hitdef registers, but it does not award the juggle point. Its ID is set to id = 1313.

This is very strange =(.

kargon

Is there a trick to using 2 different hitdefs for the same CLSN within a state? I couldn't get it to work properly as mentioned above. =(

Noctis

Stop using MoveContact. MoveContact persists. MoveContact and MoveContact = 1 are essentially the same thing.
IgnoreHitPause = 1 would allow it to add the var as soon as the attack connects. IgnoreHitPause = 0 will add it AFTER the attacks forced pause is over, but with a var that's constantly adding, this could allow it to skyrocket to however long the hitpause was or even higher.
You also want to consider multiple opponents.

[State -2, varadd]
type=varadd
triggerall=numenemy
trigger1=enemynear(0),statetype=A
trigger1=movehit=1
var(38)=1
ignorehitpause=1
[State -2, varadd]
type=varadd
triggerall=numenemy<=2
trigger1=enemynear(1),statetype=A
trigger1=movehit=1
var(39)=1
ignorehitpause=1

[State -2, varadd]
type=varset
triggera;;=numenemy
trigger1=enemynear(0),statetype!=A
var(38)=0
ignorehitpause=1
[State -2, varadd]
type=varset
triggera;;=numenemy<=2
trigger1=enemynear(1),statetype!=A
var(39)=0
ignorehitpause=1

(Youtube) (WIP) (Mediafire) (New Anime Shop) My Manga Reviews! Personal favorite Patreon! Check her out!

"There is nothing either good or bad, but thinking makes it so."

Cyanide

Movecontact and movecontact = 1 are not the same thing. They are in the situation of ignorehitpause = 0 to some extent as they would both be true for the duration OF the hitpause. Otherwise movecontact = 1 is only true for a single tick.

More importantly, his first varset has persistent = 0 which means it only triggers once regardless of anything.

The problems are most probably because your opponent enters an aerial state from the launcher while you are still in the state, and while movecontact is still true, and movecontact itself remains true until you return to idle, or your opponent does.

Now, i would think this

    [State 222]
    type = VarAdd
    trigger1 = movecontact = 1 && P2statetype = A
    var(13) = 1
    ignorehitpause = 1
    persistent = 0

Would take care of everything as it can trigger during the hitpause, p2 should still be on the ground at this point and persistent = 0 will cause it to only trigger once. If that is still causing issues, turn on debug mode and either watch your variable, or watch p2's statetype by pressing ctrl+d twice so you can work out if he's in statetype = S or not during your launcher, he might not be.


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.

Noctis

Quote from: Cyanide on May 28, 2016, 11:42:01 AM
Movecontact and movecontact = 1 are not the same thing. They are in the situation of ignorehitpause = 0 to some extent as they would both be true for the duration OF the hitpause. Otherwise movecontact = 1 is only true for a single tick.

Not in my experience. Movecontact always persisted for me through their transitioning of their gethit states. I'm not sure with MoveContact = 1. I actually never, ever thought of using that lol. Sometimes you just forget the simple things.

So I tried it out. I'm testing what you posted now and it's adding to the var for the duration of the hitpause. Just a simple movecontact is, like I said, persisting through the hitstates and adding even during a launcher instead of just when the opponent is in the air. I have nothing interfering either. It's not working.
Also, MoveContact isn't the same as saying "when a movecontact exists" like movecontact = 1? I've never experimented with it. I just assumed it worked like other things. Like var(50) is the same as var(50)=1 as in they both exist, but they're not exactly the same.

Also, what I posted isn't working, either. It adds only when they're in the air, but it's trying to read an enemy even though it's only triggered if you've made contact and they're registered as an enemy....okay then. It's also not working as it was last night for me. It's adding during the hitpause rather than after. I need to go back to the drawing board now brb.
It was the ignorehitpause. It should add properly without that. Which means movecontact = 1 works properly, too. Don't use just movecontact, but don't use ignorehitpause, either.
I also assumed it was in statedef -2. If it's in a regular state, yup what Cyanide posted works. Persistent = 0 prevents it from adding too much and adding during the hitpause like it should. Welp...what I posted. For future reference I guess? :P

(Youtube) (WIP) (Mediafire) (New Anime Shop) My Manga Reviews! Personal favorite Patreon! Check her out!

"There is nothing either good or bad, but thinking makes it so."

Niitris

Quote from: Cyanide on May 28, 2016, 11:42:01 AM
Movecontact and movecontact = 1 are not the same thing. They are in the situation of ignorehitpause = 0 to some extent as they would both be true for the duration OF the hitpause. Otherwise movecontact = 1 is only true for a single tick.

More importantly, his first varset has persistent = 0 which means it only triggers once regardless of anything.

The problems are most probably because your opponent enters an aerial state from the launcher while you are still in the state, and while movecontact is still true, and movecontact itself remains true until you return to idle, or your opponent does.

Now, i would think this

    [State 222]
    type = VarAdd
    trigger1 = movecontact = 1 && P2statetype = A
    var(13) = 1
    ignorehitpause = 1
    persistent = 0

Would take care of everything as it can trigger during the hitpause, p2 should still be on the ground at this point and persistent = 0 will cause it to only trigger once. If that is still causing issues, turn on debug mode and either watch your variable, or watch p2's statetype by pressing ctrl+d twice so you can work out if he's in statetype = S or not during your launcher, he might not be.

On a launcher, I would assume that P2statetype would become A upon contact, which is why it would activate even when P2 is hit on the ground.

I would guess putting something like P2Dist Y < 0 as a triggerall could work.

kargon

So using debug info, and with ignorehitpause = 1, persistent = 0:

P2 is:
type = 1, movetype = 0

Moment of impact:
P2 type = 1, movetype = 0
P1 juggle point is still 0

Stepping forward 1 frame:
P2 type = 3, movetype = 2
P1 juggle point still at 0

Stepping forward 2 frames:
P2 type = 3, movetype = 2
P1 juggle points moves to 1


With ignorehitpause = 0, persistent = 0

Moment of impact:
P2 type 1, movetype = 2
P1 juggle point still at 0

Stepping forward 1 frame:
P2 type = 3, movetype = 2
P1 juggle point = 0

Step forward 15 frames (same amount of hitpause I have set)
P2 type = 3, movetype = 0
P1 juggle point = 1


I added the triggerall = P2Dist Y < 0 and it ALMOST works. The problem is that if the move hits too low, it still doesn't count as a juggle point. If I hit them at medium or higher height, it works.


Cyanide

Sorry, does it matter that the juggle point doesn't change dead on impact?

I feel like something else is missing here, can you please post the whole state?

QuoteNot in my experience. Movecontact always persisted for me through their transitioning of their gethit states. I'm not sure with MoveContact = 1. I actually never, ever thought of using that lol. Sometimes you just forget the simple things.
Docs state that movecontact is an actual value and is false when 0 and true when any other value. It counts up with hittime, and hittime is any time during the sequence that p2 is in movetype = H AND you're in an attacking state, otherwise you cannot register movecontact any more, idle should drop target, although oddly you can reclaim it by entering an attacking state again. Otherwise it counts up, movecontact = 1, movecontact = 3, movecontact = 15 are all valid triggers and will occur at 1, 3 and 15 ticks beyond point of contact. Been like that for a very very long time 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.

Noctis

Quote from: Cyanide on May 29, 2016, 02:53:15 AM
Sorry, does it matter that the juggle point doesn't change dead on impact?

I feel like something else is missing here, can you please post the whole state?

QuoteNot in my experience. Movecontact always persisted for me through their transitioning of their gethit states. I'm not sure with MoveContact = 1. I actually never, ever thought of using that lol. Sometimes you just forget the simple things.
Docs state that movecontact is an actual value and is false when 0 and true when any other value. It counts up with hittime, and hittime is any time during the sequence that p2 is in movetype = H AND you're in an attacking state, otherwise you cannot register movecontact any more, idle should drop target, although oddly you can reclaim it by entering an attacking state again. Otherwise it counts up, movecontact = 1, movecontact = 3, movecontact = 15 are all valid triggers and will occur at 1, 3 and 15 ticks beyond point of contact. Been like that for a very very long time now.
Maybe I just never fully understood MoveContact then. I thought it was equivalent to saying "movehit OR moveguarded. it touched them. hence contact" and that was all and that the odd persistence was...idk just annoying. Lol. Thanks for the info!

(Youtube) (WIP) (Mediafire) (New Anime Shop) My Manga Reviews! Personal favorite Patreon! Check her out!

"There is nothing either good or bad, but thinking makes it so."