News:

MFG's Character of the Month: October 2026 Nominations

Main Menu

Physical attack going through projectile unphased

Started by JustNoPoint, August 11, 2016, 05:30:49 PM

Previous topic - Next topic

JustNoPoint

What's the best way to make a move destroy a single hit projectile without being phased?

One thought is hitoverride but that directs to a new stateno and I just need the move to keep going. Another thought is to make an invisible helper that takes the hit of the projectile but there could still be a chance the projectile would hit the root's clsn2 1st I'd think. But I could be wrong on that. Anyway how you guys do it?

Memo

Super armor  but even then your players gonna take some damage

JustNoPoint

Actually I just thought that a nothitby on the root while the helper is active should fix my potential helper issue but it'll be a bit before I can test so I'll leave this unsolved till I test it

Rajaa Retired

Invisible helper with reversaldef and/or hitvoerride.

If it's a full game or you don't give a crap about fadeout animations or projectiel sctrls, then reversal def will take priority over your character's vulnerbale hitboxes, so a nothitby wouldn't necessary.

JustNoPoint

Was the helper supposed to get the hitoverride/reversaldef? I assume the player was.

I actually found another solution that worked for this particular case. Since it's an EX attack I made it so that the CLSN2 of the player wasn't within the helper's CLSNs. This gives the attacking portion a high priority which isn't too bad for an EX.

No matter what I tried the character could still be hit when the projectile hit the helper because the CLSN boxes were so close in size.

For future references is there a way to make it so that if a helper is hit it causes the root to be hit and take attributes from the attacker's hitdef?

Though that may be overly complicated.  It just seems it'd be easier to make an attack that doesn't stop if it strikes a projectile.

Ugh this is confusing because there are so many parts to this.

The hand is the only part that should destroy Projectiles. So if a projectile hits the rest of P1 it should still hit them. And if an attack hits the hand or any other part of P1 it should hit.

I don't mind my solution to this move but I'd still like to know how to do this better for future moves that may not be able to have such invincibility.

Rajaa Retired

Yes, a helper's reversaldef supersede the root's vulnerbale hitboxes. As long as the eenemy projectiles come in contact with the helper reversal clsn, it will apply the reversal effects before the enemy projectile's hitdef is registered.

No need for nothitbys, just duplicate your character's clsn into the helper, change the portion that should destroy projectiles to red clsn, and then bind the helper to your character for the desired duration.

There's no way to account for multi hitting projectiles with reversaldefs, the character shooting the projectile would have to do that, and I'm not even sure how this explanation applies to actual projectiles from the projectile state controller.

JustNoPoint

Okay I should have tried it in the Helper then. I'll have to make a version like this to test it. It didn't make sense to add it to the helper at the time because the root would have still been left open. I wasn't aware it would override the root's too. That's cool I'll add that info to the MUGEN Class for this.

I don't care about the projectile SCTL as everyone should be using helpers for fireballs instead >:-(

Cyanide

It would be a good idea to add the P flag to the hitflag in the reversaldef. That would actually wipe out multi hit projectiles as well. Won't help you against projectile beams though.


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.

Jesuszilla

P on hitdef + a projectile. As in, an actual projectile. Helpers will cause hitsparks to appear.

JustNoPoint

I presumed it needed the P flag to hit projectiles in general. I won't be able to test till next week due to work but I figured I set it to SCA, NP,SP,HP

And that once the helper contacts a projectile it gets destroyed too. For multi hit projectiles I'd want it to just take out 1 hit. Then the rest would hit the root

Edit: oh projectile sctrls have actual uses outside of var alternatives!

JustNoPoint

I won't be able to test this till Tuesday due to work but I had a thought.

With reversaldef you can replace the thing you hit's hitspark with your own. So couldn't you just replace it with -1 or an invisible animation and not assign your own spark to the helper? Or did I misunderstand the spark parameter in reversaldef and it doesn't replace p2's hit spark (in which case I need to update the description in the Mugen class thread)

Odb718

This is what I have for my Ibuki's attack counter move.

Spoiler (click to show)

[State 960, ReversalDef]
type = ReversalDef
triggerall = enemy, isHelper
trigger1 = animelem = 2
reversal.attr = SCA,SP,NP,HP,NA,SA,HA,NT,ST;,AA,AT
sparkno = s8880
sparkxy = 30,0
hitsound = s54,17
p1stateno = 963
p2stateno = 956 ; ifelse(MoveHit= 1,956,955)

[State 960, ReversalDef]
type = ReversalDef
triggerall = !enemy, numhelper=0
triggerall = !enemy, isHelper
trigger1 = animelem = 2
reversal.attr = SCA,SP,NP,HP,NA,SA,HA,NT,ST;,AA,AT
sparkno = s7770
sparkxy = 30,0
hitsound = s54,17
p1stateno = 963
p2stateno = ifelse(MoveHit= 1,956,955) ; ifelse(MoveHit= 1,956,955)


In ALL THREE states I send P1 & P2 to, I have

[State 0, DestroySelf]
type = DestroySelf
trigger1 = IsHelper

This is the best way I've found to reduce the amount of clones you get from P2.
Hopefully this helps out some way.
vVv Gouken718 vVv SabreTooth718 vVv


D. HoChoy

Quote from: Just No Point on August 14, 2016, 11:41:30 AM
I won't be able to test this till Tuesday due to work but I had a thought.

With reversaldef you can replace the thing you hit's hitspark with your own. So couldn't you just replace it with -1 or an invisible animation and not assign your own spark to the helper? Or did I misunderstand the spark parameter in reversaldef and it doesn't replace p2's hit spark (in which case I need to update the description in the Mugen class thread)

Nope, you're pretty much correct. Anyways.... have you gone to testing it yet?

JustNoPoint

Not yet, this is my 1st day off but I've been busy. Got to get some chores done and take baby to dentist today. Hope to code it up this afternoon

JustNoPoint

All right. I pretty much finally got this going!

@[user id=7657]Jesuszilla[/user]:
I couldn't get your projectile method to work.

This is the closest I could get to work

Spoiler (click to show)

[State 1000, VarSet]
type = VarSet
trigger1 = Time = 0
var(21) = 0

[State 0, Projectile]
type = Projectile
trigger1 = AnimElemTime(5) >= 0 && AnimElemTime(11) <0
trigger1 = !Var(21)
ProjID = 1604
projanim = 1604
projscale = 1,1
projhitanim = -1
projremanim = -1
projremovetime = -1
;HitDef
attr = S,NP,SP,HP       ;SCA,NA,SA,HA,NP,SP,HP,NT,ST,HT
postype = p1


[State 1000, VarSet]
type = VarSet
triggerall = !Var(21)
trigger1 = ProjCancelTime(0) > 0
var(21) = 1

But the above wouldn't ever go away so it basically made an invisible wall. Also hitsparks appeared at P1's feet when the fireball hit said invisible wall.

Granted this was my 1st time using the projectile SCTRL

@[user id=35413]Palette Jesus[/user]:
@[user id=10719]Odb718[/user]:
This is what I got working

Spoiler (click to show)

;----------------------------------------------------
;Projectile Destroying Helper
[Statedef 1604]
type    = S
movetype= I
physics = N
anim = 1604
sprpriority = 1
velset = 0,0



[State 960, ReversalDef]
type = ReversalDef
trigger1 = animelem = 1
reversal.attr = SCA,SP,NP,HP;,NA,SA,HA,NT,ST;,AA,AT
;hitsound = s54,17
sparkxy = ceil(84 * const(size.xScale)), 0
p1stateno = 1605
p2stateno = 1605

[State 960, ReversalDef]
type = ReversalDef
trigger1 = animelem = 2
reversal.attr = SCA,SP,NP,HP;,NA,SA,HA,NT,ST;,AA,AT
;hitsound = s54,17
sparkxy = ceil(107 * const(size.xScale)), 0
p1stateno = 1605
p2stateno = 1605

[State 960, ReversalDef]
type = ReversalDef
trigger1 = animelem = 3
reversal.attr = SCA,SP,NP,HP;,NA,SA,HA,NT,ST;,AA,AT
;hitsound = s54,17
sparkxy = ceil(160 * const(size.xScale)), 0
p1stateno = 1605
p2stateno = 1605

[State 960, ReversalDef]
type = ReversalDef
trigger1 = animelem = 4
reversal.attr = SCA,SP,NP,HP;,NA,SA,HA,NT,ST;,AA,AT
;hitsound = s54,17
sparkxy = ceil(207 * const(size.xScale)), 0
p1stateno = 1605
p2stateno = 1605

[State 960, ReversalDef]
type = ReversalDef
trigger1 = animelem = 5
reversal.attr = SCA,SP,NP,HP;,NA,SA,HA,NT,ST;,AA,AT
;hitsound = s54,17
sparkxy = ceil(216 * const(size.xScale)), 0
p1stateno = 1605
p2stateno = 1605


[State 0, ChangeState]
type = ChangeState
trigger1 = root, MoveType = H
trigger2 = !AnimTime
value = 1605
ignorehitpause = 1

;----------------------------------------------------
; Destroy Projectile Destroying Helper
[Statedef 1605]
type    = S
movetype= I
physics = N
anim = 5000
sprpriority = 1
velset = 0,0

[State 0, DestroySelf]
type = DestroySelf
trigger1 = IsHelper
ignorehitpause = 1

Only thing I can't get to work right is that I'd like the animation a fireball typically plays when it gets destroyed to play.
But I don't think I can do this in universal MUGEN. Only in a full game environment?

I used the sparkxy to make it at least have some kind of animation

And to note if you use -1 for the hitspark it won't appear.

Jesuszilla

#15
That's because you have projremovetime = -1. It should just be 1. The projectile will be created every tick.

And you NEED triggerall = !NumProjID(1604).

Quote from: Just No Point on August 18, 2016, 02:16:09 AM
Only thing I can't get to work right is that I'd like the animation a fireball typically plays when it gets destroyed to play.

That's why I said to use a projectile.

JustNoPoint

#16
Ah.

Though they still created P2's hitsparks. I think I prefer the reversaldef helper method since it makes me not have to use a var.

Edit: I replied before your edit. If the projectile method makes p2 use their fireball destroyed anim I guess I need to go back to perfecting it instead.

Edit2: I'll try this out and see if the projectile destroy self and hitspark appears in the correct location.

Jesuszilla

#17
Wait, just realized you'll need this as well for people who don't code helper projectiles right:

[State 0, ReversalDef]
type = ReversalDef
trigger1 = blah
reversal.attr = SCA,NP,SP,HP
pausetime = 0,0
sparkno = S1 ; or whatever your blank anim is
hitsound = -1
numhits = 1



Also remember your hitdef needs to have the P flag.

JustNoPoint

Well I did put the P flag in the Projectile hitdef

But seems I did it like the reversaldef instead of how it should :p

I said
attr = S,NP,SP,HP 

But should have used
attr = S,SP. in the projectile sctrl

Or is that not where you meant?

Jesuszilla

No, that's not what I meant. You need to put P in the hitflag of the hitdef.

Something like hitflag = MAFP


Also my bad with the code I gave. It should actually be ProjContactTime, not ProjCancelTime.