Posted by ziaker
in needing a good clash hit system (Started by ziaker May 10, 2020, 10:45:49 pm
Board: M.U.G.E.N Development Help
Board: M.U.G.E.N Development Help
;---------------------------------------------------------------------------
[State -1, Auto Guard]
type = ChangeState
value = 150
triggerall = power >= 500
triggerall = Alive = 1
trigger1 = (GameTime%8100) = 0
trigger1 = statetype != A
trigger2 = (stateno = [5000,5020]) && (GameTime%200) = 0
trigger1 = ctrl = 1
poweradd = 500
;---------------------------------------------------------------------------
;-------------------------------------------------------------------------------
[Statedef 2748]
type = S
movetype= A
physics = N
juggle = 7
ctrl = 0
anim = 2748
sprpriority = 2
[State 0, PosAdd]
type = PosAdd
triggerall = p2bodydist x < 100
trigger1 = Time = 7
x = p2bodydist x-20
y = -60
[State 0, PosAdd]
type = PosAdd
triggerall = p2bodydist x >= 100
trigger1 = Time = 7
x = 100
y = -60
;[State 0, VelSet]
;type = Veladd
;trigger1 = time > 9
;y = 2
;x = 4
[State 0, VelSet]
type = Velset
trigger1 = time > 9
y = 10
x = 12
;[State 0, VelSet]
;type = VelSet
;trigger1 = time > 2
;;x = 0
;y = -2
;ignorehitpause =
;persistent =
[State 0, VelMul]
type = VelMul
trigger1 = time > 9
x = 0.9
y = 0.5
[State 60, Explod diagonal]
type = Explod
trigger1 = time%7 = 0
anim = 7122
ID = 7122
pos = 30,-20
postype = p1 ;p2,front,back,left,right
facing = 1
vfacing = 1
bindtime = 1
removetime = -2
supermove = 1
pausemove =1
scale = 0.3, 0.3
sprpriority = 2
ontop = 0
shadow = 0,0,0
ownpal = 1
removeongethit = 0
ignorehitpause = 1
[State 60, Arena Grande atras]
type = Explod
trigger1 = animelem = 2
anim = 7100
ID = 7100
pos = 0,10
postype = p1 ;p2,front,back,left,right
facing = 1
vfacing = 1
bindtime = 1
removetime = -2
supermove = 1
pausemove =1
scale = 0.3, 0.3
sprpriority = 1
ontop = 0
shadow = 0,0,0
ownpal = 1
removeongethit = 0
ignorehitpause = 1
[State 210, 1]
type = HitDef
triggerall = !movecontact
trigger1 = animelem = 2
attr = S, NA
animtype = Light
damage = 60,5
guardflag = MA
pausetime = 12,12
sparkno = -1;s6000
guard.sparkno = S6999
sparkxy = -8,-25
hitsound = S3,13
guardsound = S0,8
ground.type = High
ground.slidetime = 20
ground.hittime = 20
ground.velocity = -13,-5.5
air.velocity = -13,-5.5
slidetime = 8, 15
fall = 1
envshake.time = 5
envshake.freq = 100
envshake.ampl = -4
envshake.phase = 1
[State 210, 1]
type = HitDef
triggerall = prevstateno = 2746
triggerall = !movecontact
trigger1 = animelem = 2
attr = S, NA
animtype = Light
damage = 60,5
guardflag = MA
pausetime = 12,12
sparkno = -1;s6000
guard.sparkno = S6999
sparkxy = -8,-25
hitsound = S3,13
guardsound = S0,8
ground.type = High
ground.slidetime = 20
ground.hittime = 20
ground.velocity = -5,-10.5
air.velocity = -5,-10.5
slidetime = 8, 15
fall = 1
envshake.time = 5
envshake.freq = 100
envshake.ampl = -4
envshake.phase = 1
[State 200, Spark CVS]
type = Explod
triggerall = Numexplod(7020) = 0
trigger1 = Movehit = 1
anim = 7020
ID = 7020
postype = P2
pos = 0,-40
facing = 1
sprpriority = 3
supermove = 1
removetime = -2
bindtime = 1
ownpal = 1
scale = 0.35,0.35
removeongethit = 1
ontop = 0
supermovetime = 999
ignorehitpause = 1
[State 200, 2]
type = PlaySnd
trigger1 = animelem = 1
value = 0, 2
volume = 10
[State 3001, ScreenBound]
type = ScreenBound
triggerall = time > 30
trigger1 = p2movetype = H || (BackEdgeBodydist < -1 && BackEdgeBodydist > -30)
movecamera = 0,0
value = 0
[State 3001, End]
type = ChangeState
trigger1 = animtime = 0
value = 50
ctrl = 1
;-------------------------------------------------------------------------------
[Statedef 235]
type = A
movetype= A
physics = A
juggle = 2
poweradd = 25
ctrl = 0
anim = 235
sprpriority = 2
[State 200, Spark CVS]
type = Explod
triggerall = Numexplod(7051) = 0
trigger1 = Movehit = 1
anim = 7051
ID = 7051
postype = P1
pos = 30,-30
facing = 1
sprpriority = 2
supermove = 1
removetime = -2
bindtime = 1
ownpal = 1
scale = 0.3,0.3
removeongethit = 1
ontop = 1
supermovetime = 999
ignorehitpause = 1
[State 200, FX Flame Up]
type = Explod
triggerall = numexplod(7063) = 0
trigger1 = Time = 3
anim = 7063
ID = 7063
postype = P1
pos = 15,30
facing = 1
sprpriority = 3
supermove = 1
removetime = -2
bindtime = 1
ownpal = 1
scale = 0.2,0.2
removeongethit = 1
ontop = 0
supermovetime = 999
ignorehitpause = 1
[State 0, Velmul]
type = Velmul
trigger1 = time = 0
X = 0.8
[State 0, Veladd]
type = Veladd
trigger1 = vel x = 0
trigger1 = time = 0
X = 0.9
[State 0, Velset]
type = Velset
triggerall = vel y > -0.5
trigger1 = time = 0
y = -1
[State 0, Velset]
type = Velset
trigger1 = animelem = 2
y = -2
[State 234, 1]
type = HitDef
triggerall = !movecontact
trigger1 = AnimElem = 4
;trigger2 = AnimElem = 5
attr = A, NA
damage = 10
guardflag = HA
priority = 3
pausetime = 12,12
sparkno = -1;s6000
guard.sparkno = S6999
sparkxy = -15,-35
hitsound = S0,7
guardsound = S0,8
ground.type = High
ground.slidetime = 5
ground.hittime = 5
ground.velocity = -2.5,10
air.velocity = -50,2
fall = 1
envshake.time = 12
envshake.freq = 200
envshake.ampl = -98
envshake.phase = 321
p2stateno = 1790
[State 200, Spark CVS]
type = Explod
triggerall = Numexplod(7016) < 2
trigger1 = Movehit = 1
anim = 7016
ID = 7016
postype = P1
pos = 30,-4
facing = 1
sprpriority = 2
supermove = 1
removetime = -2
bindtime = 1
ownpal = 1
scale = 0.5,0.5
removeongethit = 1
ontop = 1
supermovetime = 999
ignorehitpause = 1
[State 234, 2]
type = PlaySnd
trigger1 = Time = 0
value = 0, 2
volume = 10
[State 234, End]
type = ChangeState
trigger1 = AnimTime = 0
value = 50
ctrl = 1
;-------------------------------------------------------------------------------
[State -1, Standing Parry]
type=hitoverride
trigger1= var(59)<1
triggerall = power >= 500
trigger1= roundstate=2 && (statetype!=A || stateno=5120)
;trigger1= command = "fwd" && command != "back" && command !="up" && command !="down"
trigger1= command!="holdback"&&command!="holdup"&&command!="holddown"
trigger1= ctrl || (stateno=[970,980])
attr=SA,AA
stateno=970
slot=0
time=8
[Statedef 970]
type=S
physics=S
movetype=I
anim=970
velset=0,0
ctrl=1
sprpriority=2
poweradd=-500
facep2=1
[State 0, PosSet]
type = PosSet
trigger1 = !Time
y = 0
ignorehitpause = 1
[State 970, hb]
type=hitby
trigger1=1
value=SCA,AT
time=1
[State 970, stop]
type=posfreeze
trigger1=1
value=1
[State 970, pause]
type=pause
trigger1=!time
time=1
movetime=1
endcmdbuftime=1
pausebg=0
[State 970, pause]
type=pause
trigger1= !time && numenemy
trigger1= (enemynear,movehit=1)
time= ifelse((enemynear,hitpausetime=[0,15]), 1-(enemynear,hitpausetime), 0)
movetime= ifelse((enemynear,hitpausetime=[0,15]), 1-(enemynear,hitpausetime), 0)
endcmdbuftime= ifelse((enemynear,hitpausetime=[0,15]), 1-(enemynear,hitpausetime), 0)
pausebg=0
[State 970, blueflash]
type=palfx
trigger1= !time
add=0,50,255
sinadd=0,-50,-255,60
time=15
[State 702, Snd]
type=playsnd
trigger1= !time
value=131,15
channel=0
;[State 970, Spark]
;;type=explod
;trigger1= animelem=2
;anim=7400
;ID=7400
;sprpriority=5
;postype=p1
;pos=0,-15
;pausemovetime=60
;ownpal=1
[State 970, nowalk]
type=assertspecial
trigger1=1
flag=nowalk
[State 970, End]
type=changestate
trigger1= !animtime
value=0
ctrl=1
[State 210, 1]
type = HitDef
triggerall = !movecontact
trigger1 = 1
attr = S, NA
animtype = Light
damage = 120,50
guardflag = MA
pausetime = 12,12
sparkno = -1;s6000
guard.sparkno = s7000
sparkxy = -8,-25
hitsound = S0,13
guardsound = S0,8
ground.type = High
ground.slidetime = 15
ground.hittime = 15
ground.velocity = -1,-8
air.velocity = -32,-6
fall = 1
envshake.time = 20
envshake.freq = 220
envshake.ampl = -10
envshake.phase = 120
p2stateno = 1790
;targetstate = 1790
;p2facing = 1
;Clash
[Statedef 12000]
Type = S
Physics = N
;Anim = 12000
;Sprpriority = 0
[State 0, Statetypeset]
Type = Statetypeset
trigger1 = Root, Movetype = I
Movetype = I
Ignorehitpause = 1
[State 0, Statetypeset]
Type = Statetypeset
trigger1 = Root, Movetype = A
Movetype = A
Ignorehitpause = 1
[State 0, AssertSpecial]
type = AssertSpecial
trigger1 = 1
flag = invisible
ignorehitpause = 1
[State 0, ChangeAnim]
type = ChangeAnim
trigger1 = 1
value = Root, Anim
elem = Root, Animelemno(0)
ignorehitpause = 1
[State 0, NotHitBy]
type = NotHitBy
trigger1 = 1
value = SCA,NA,SA,HA,NP,SP,HP,NT,ST,HT
time = 1
ignorehitpause = 1
[State 0, ReversalDef]
type = ReversalDef
trigger1 = 1
reversal.attr = SCA,NA,SA,HA,NP,SP,HP,NT,ST,HT
sparkno = -1
hitsound = S1,0
p1stateno = 12001
;p2stateno =
ignorehitpause = 1
[State 0, BindToRoot]
type = BindToRoot
trigger1 = 1
time = 1
;facing = 0
pos = 0,0
ignorehitpause = 1
;persistent =
[State 0, Turn]
type = Turn
trigger1 = facing != Root, Facing
ignorehitpause = 1
;persistent =
[state 0 destroyself]
Type = Destroyself
trigger1 = Root, Stateno != [200,799]
ignorehitpause = 1
;-------------------------------------------------------------------------------
; Clash Helper reversed
[Statedef 12001]
Type = S
Physics = N
;Anim = 12000
;Sprpriority = 0
[State 0, Statetypeset]
Type = Statetypeset
trigger1 = 1
Movetype = I
Ignorehitpause = 1
[State 0, Statetypeset]
Type = Statetypeset
trigger1 = Root, Movetype = A
Movetype = A
Ignorehitpause = 1
[State 0, AssertSpecial]
type = AssertSpecial
trigger1 = 1
flag = invisible
ignorehitpause = 1
[State 0, ChangeAnim]
type = ChangeAnim
trigger1 = 1
value = Root, Anim
elem = Root, Animelemno(0)
ignorehitpause = 1
[State 0, NotHitBy]
type = NotHitBy
trigger1 = 1
value = SCA,NA,SA,HA,NP,SP,HP,NT,ST,HT
time = 1
ignorehitpause = 1
[State 0, Pause]
type = Pause
trigger1 = !time
time = 8
;movetime = 1
;endcmdbuftime = 0
;pausebg = 1
ignorehitpause = 1
;persistent =
[State 0, EnvShake]
type = EnvShake
trigger1 = !time
time = 1
freq = 60
ampl = -4
phase = 90
ignorehitpause = 1
;persistent =
[State 0, Explod]
type = Explod
trigger1 = !time
anim = 7000
ID = 7000
pos = 27,-37
postype = p1 ;p2,front,back,left,right
facing = 1
vfacing = 1
bindtime = 1
vel = 0,0
accel = 0,0
random = 0,0
removetime = -2
pausemovetime = 0
scale = 1.4,1.4
sprpriority = 0
ontop = 0
shadow = 0,0,0
ownpal = 0
removeongethit = 1
ignorehitpause = 1
;trans =
;persistent =
;supermove = 0
;pausemove = 0
;[State 0, ChangeState]
;type = ChangeState
;trigger1 = !time
;value = 151
;ctrl = 0
;anim = 151
;ignorehitpause = 1
;persistent =
[State 0, BindToRoot]
type = BindToRoot
trigger1 = 1
time = 1
;facing = 0
pos = 0,0
ignorehitpause = 1
;persistent =
[State 0, Turn]
type = Turn
trigger1 = facing != Root, Facing
ignorehitpause = 1
;persistent =
[state 0, destroyself]
type = destroyself
trigger1 = time = 20
ignorehitpause = 1
;===============================================================================
[StateDef -2]
;===============================================================================
[State 0, Helper]
Type = Helper
trigger1 = !numhelper(12000)
trigger1 = StateNO = (200, 600)
trigger1 = !Movereversed
Name = " Clash "
ID = 12000
StateNO = 12000
Pos = 0, 0
Postype = P1
Facing = 1
KeyCtrl = 0
Ownpal = 0
Supermovetime = 0
Pausemovetime = 0
Ignorehitpause = 1
;[State 0, ChangeAnim]
;type = ChangeAnim
;trigger1 = 1
;value = 0
;elem = 1
;ignorehitpause = 1
;persistent =
;[State 12000, ReversalDef]
;type = ReversalDef
;trigger1 = 1
;reversal.attr = S,NA,SCA,SA,HA,NP,SP,HP,NT,ST,HT
;pause,0
;sparkno = S1500
;hitsound = S1,0
;p1stateno = 151
;p2stateno =
;ignorehitpause = 1
;persistent =
;ignorehitpause =
;trans =
;persistent =
;supermove = 0
;pausemove = 0
[state 0, velset]
type = velset
trigger1 = numhelper(12000)
trigger1 = Helper(12000), Stateno != 12000
trigger1 = helper(12000), Time = 1
X = -16
Ignorehitpause = 1
[statedef 220]
type = S
Movetype = I
physics = S
Anim = 220
poweradd = -15
ctrl = 1
[state 220, 2]
type = posadd
trigger1 = animelem = 2
x = p2bodydist X+35
;-------------------------------------------------------------------------------
[state 220 ,5]
type = changestate
trigger1 = animtime = 3
value = 0
ctrl = 1
[State 220, 2]
type = HitDef
trigger1 = !movecontact
trigger1 = AnimElem = 5
attr = S, NA ;Attribute: Standing, Normal Attack
damage = 33, 0 ;Damage that move inflicts, guard damage
animtype = heavy ;Animation type: Light, Medium, Heavy, Back (def: Light)
guardflag = MA ;Flags on how move is to be guarded against
hitflag = MAF ;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 = 8, 8 ;Time attacker pauses, time opponent shakes
sparkno = 0 ;Spark anim no (Def: set above)
sparkxy = -10, -76 ;X-offset for the "hit spark" rel. to p2,
;Y-offset for the spark rel. to p1
hitsound = 5, 0 ;Sound to play on hit
guardsound = 6, 0 ;Sound to play on guard
ground.type = High ;Type: High, Low, Trip (def: Normal)
ground.slidetime = 5 ;Time that the opponent slides back
ground.hittime = 12 ;Time opponent is in hit state
ground.velocity = -4 ;Velocity at which opponent is pushed
airguard.velocity = -1.9,-.8 ;Guard velocity in air (def: (air.xvel*1.5, air.yvel/2))
air.type = High ;Type: High, Low, Trip (def: same as ground.type)
air.velocity = -1.4,-3 ;X-velocity at which opponent is pushed,
;Y-velocity at which opponent is pushed
air.hittime = 12 ;Time before opponent regains control in air
[State 220, END]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1
So read up on this
http://mugenguild.com/forum/topics/super-armor-v2-hitstun-added--117143.msg1137256.html#msg1137256
You're not going to know what each part does. Use Mugen Class > Master Thread to read the topics you dont know. It's one of the links I posted.
Make sure you put the Statedef -2 stuff in your Statedef -2. A copy and paste of this code could work. It's probably not going to be exactly like you'd like, but it will be a start.
But if it was to choose one, I would choose the one from the Dragon Ball Advanced Adventures mechanic that I think is a kind of "super guard" that has an X number of "life" that when it breaks, the character becomes vulnerable.I would do a simple method for this. XGargoyle is right in one way, but I see it as more of a guard crush instead of super armor. Guard crush is a lot easier than super armor. But I could be thinking of the wrong thing watching that video.
For stuff like Reversal Def, HitDef, & Pos, Look at this thread. You'll find everything you need. Use Ctrl+F in your browser to jump to the topic you're looking for.
http://mugenguild.com/forum/topics/the-mugen-docs-master-thread-168949.0.html
For more complex battle mechanics, look through this thread.
http://mugenguild.com/forum/topics/expanding-mugen-class-the-mechanics-master-thread-173411.0.html
You can also find a LOT of stuff fully explained in the sub-sections here. Tips and Tricks and Code Library have a ton of things explained 100%.
As for "the attack that pushes to the end of the screen"
that may just be in your hitdef, or a custom state, or a push block. But I think you'll use a custom state.
http://mugenguild.com/forum/topics/push-block-guard-push-advancing-guard-mechanics-173986.0.html
Make a new topic titled something like "Help me make an attack where P2 flies off the screen" and we can help you with multiple topics at the same time.
But for your Super Guard, do you want to not take damage while getting hit? Do you want to be able to stop P2 from being able to block after a certain number of blocked attacks? Explain as many attributes of it as you can and we can help you better.