News:

MFG's Character of the Month: October 2026 Nominations

Main Menu

Adding hits

Started by gabe2222, June 11, 2011, 12:07:30 AM

Previous topic - Next topic

gabe2222

OK I'm making a combo based game(meaning no projectiles) and I'm trying to make increase the number of hits that a grab can do on an opponent. Can someone help me with this please?

Cyanide

You mean increment the combo counter? Using Hitadd is the normal method but generally you have to actually HIT p2 to make it look right.


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.

gabe2222

No what I mean is I have a throw that does hits like Street fighter 2. For example in street fighter two there are some throws that go one for 10 to 11 hits if you don't move the dpad at all. I have a char with a throw like this but it only maxes at 4 hits. I'm trying to get it to max at 10 hits.

Cyanide

Oh, you want to mash throw?

Command = "a" (or x, whatever) to add additional hitdef hits. Use hitcount < 11 in order to limit the number of times it'll activate.


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.

gabe2222

Ok where exactly would I put that line? In the cmd file or the cns file?

Cyanide

You've made the throw. Throughout the throw you have hitdefs to give you 4 hits correct? Add another hitdef that deals less damage. Use command = "whatever" and hitcount < 11 as triggers for that hitdef. That will add additional hits every time you press the button in question. I'm giving vague advice here because i have nothing concrete for what you ahve done.


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.

gabe2222

Ok I'll try and put it up here to show you. Sorry about that. Here is the throw line



; Throw1
[StateDef 845]
type = c
MoveType = A
VelSet = var(0) := 0, var(12) := 0
Anim = 845
SprPriority = 2
ctrl = var(13) := 0

[State x, invulnerable]
type = NotHitBy
trigger1 = 1
value = sca
ignorehitpause = 1

[State 845, tech hit yesno]
type = Null
triggerall = numtarget(840)
Trigger1 = time <= 25 && (Target(840), Command = "holdfwd" || Target(840), Command = "holdback") && (Target(840), Command = "2 P" || Target(840), Command = "2 K")
Trigger1 = Var(0) := 1 && 0

[State 845, fat]
type = Width
trigger1 = animelem = 10, < 0
edge = 64

[State 845, bind]
type = TargetBind
trigger1 = animelemtime(10) < 0
ID = 840
pos = 86 + ifelse(animelemno(0) = 2 || animelemno(0) = 4 || animelemno(0) = 6 || animelemno(0) = 8, !(time % 2), 0), -59

Cyanide

That cannot possibly be all of it as i see no way of leaving that state.

In addition, that contains some very very complex code and what you're asking for is simple.


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.

gabe2222

This isn't my character. I'm just using it. That's also not all of the code. if you want I can post the whole throw up.

; stomach claw Attempt
[StateDef 840]
type = c
MoveType = A
Ctrl = 0
VelSet = 0, 0
Anim = 840
SprPriority = 2
PowerAdd = 21
Juggle = var(20) := 1

[State 840, hit]
Type = HitDef
triggerall = var(21) && !var(15)
Trigger1 = Animelemno(0) = 2 && var(17) := -1
Attr = C, NT
P2Facing = 1
P1Facing = IfElse(Var(0), 1, -1)
HitFlag = M-
Priority = 1, Miss
SparkNo = -1
HitSound = S800
P1StateNo = 845
P2StateNo = 850
Fall = 1
Guard.Dist = 0
ID = 840
YAccel = .5
fall.recover = 0
getpower = 21, 21
persistent = 0

[State 840, Miss SND]
Type = PlaySND
Trigger1 = Animelem = 3
Value = 5000, 1
Channel = 0
volume = var(31)

[State 840, End]
Type = ChangeState
Trigger1 = !AnimTime
Value = 11
Ctrl = 1

;ignorehitpause =
;persistent =
; stomach claw Throwing
[StateDef 845]
type = c
MoveType = A
VelSet = var(0) := 0, var(12) := 0
Anim = 845
SprPriority = 2
ctrl = var(13) := 0
Trigger1 = (Command = "a1")
Trigger2 = Hitcount < 11


[State x, invulnerable]
type = NotHitBy
trigger1 = 1
value = sca
ignorehitpause = 1

[State 845, tech hit yesno]
type = Null
triggerall = numtarget(840)
Trigger1 = time <= 25 && (Target(840), Command = "holdfwd" || Target(840), Command = "holdback") && (Target(840), Command = "2 P" || Target(840), Command = "2 K")
Trigger1 = Var(0) := 1 && 0

[State 845, fat]
type = Width
trigger1 = animelem = 10, < 0
edge = 64

[State 845, bind]
type = TargetBind
trigger1 = animelemtime(10) < 0
ID = 840
pos = 86 + ifelse(animelemno(0) = 2 || animelemno(0) = 4 || animelemno(0) = 6 || animelemno(0) = 8, !(time % 2), 0), -59

[State 845, count times buttons are pressed]
type = Null
triggerall = animelem = 8, < 0
trigger1 = var(12) > 0 && !(time % 8); decrease steadily
trigger1 = var(12) := (var(12) - (1 + var(13)))
trigger2 = command = "a1" || command = "b1" || command = "c1" || command = "x1" || command = "y1" || command = "z1"; add times punch buttons are pressed
trigger2 = var(12) := var(12) + 1 + command = "a1" + command = "b1" + command = "c1" + command = "x1" + command = "y1" + command = "z1"
trigger3 = target(840), command = "a1" || target(840), command = "b1" || target(840), command = "c1" || target(840), command = "x1" || target(840), command = "y1" || target(840), command = "z1"; substract times punch p2 buttons are pressed
trigger3 = var(12) := var(12) - 1 - (target(840), command = "a1" || target(840), command = "x1") - (target(840), command = "b1" || target(840), command = "y1") - (target(840), command = "c1" - target(840), command = "z1")

[State 845, blink]
type = PalFX
triggerall = animelem = 2, >= 0 && animelem = 8, < 0
trigger1 = command = "a1" || command = "b1" || command = "c1" || command = "x1" || command = "y1" || command = "z1"
time = 1
add = 128, 128, 128

[State 845, tech bonus or p2 dead]
type = ChangeAnim
trigger1 = animelem = 3 && var(0)
trigger2 = animelemno(1) = animelemno(0)+1 && animelem = 10, < 0 && !p2life
value = anim
elem = 10

[State 845, frameskip]
type = ChangeAnim
triggerall = (animelemno(0) = [2, 7]) && animelemtime(animelemno(0)) > 2
trigger1 = var(12) > 4
value = anim
elem = animelemno(0) + 1

[State 845, more hits]
type = ChangeAnim
triggerall = (!var(13) && animelem = 5) || (var(13) < 2 && animelem = 5) || (var(13) < 3 && animelem = 7)
trigger1 = var(12) > 11
trigger1 = var(13) := var(13) + 10
value = anim
elem = animelemno(0) - 2

[State 845, less hits]
type = ChangeAnim
triggerall = animelem = 5 || animelem = 7
trigger1 = var(12) < -10
value = anim
elem = 10

[State 845, hold p2 up]
type = TargetState
trigger1 = animelem = 3 || animelem = 5 || animelem = 7 || animelem = 9
value = 851
ID = 840

[State 845, claw p2]
type = TargetState
trigger1 = animelem = 2 || animelem = 4 || animelem = 6 || animelem = 8
value = 852
ID = 840

[State 845, hitspark]
type = Explod
trigger1 = animelem = 2 || animelem = 4 || animelem = 6 || animelem = 8
anim = fifelse(animelem = 2, = 0, 2, 0)
pos = 85, -58
ontop = 1
ownpal = 1
supermovetime = 999
pausemovetime = 999
random = var(19), var(19)

[State 845, hitadd]
type = HitAdd
trigger1 = (var(13) && animelem = 2) || animelem = 4 || animelem = 6 || (!var(0) && animelem = 8)
value = 1

[State 845, Damage]
Type = TargetLifeAdd
Trigger1 = animelem = 2 || animelem = 4 || animelem = 6 || animelem = 8 || (animelem = 10 && var(0))
value = ceil(fvar(2) * -ifelse(animelem = 10, = 0, 62, ifelse(animelem = 2, = 0, 55, ifelse(animelem = 8, = 0, 28, 14))))
ID = 840
absolute = 1

[State 845, claw snd]
type = PlaySnd
trigger1 = animelem = 2 || animelem = 4 || animelem = 6 || animelem = 8
value = 845
channel = 1

[State 845, bind]
type = TargetBind
trigger1 = animelem = 10
ID = 840
pos = 84, -60 - target(840), const(size.mid.pos.y)

[State 845, Fly]
Type = TargetState
triggerall = NumTarget(840)
Trigger1 = AnimElem = 10
Value = ifelse(var(0) && p2life, 858, 855)
ID = 840

[State 845, End]
Type = ChangeState
Trigger1 = !animtime
Value = 0
ctrl = 1

gabe2222

What I need to know basically is what to do to make the throw last longer than the four hits that it does?

gabe2222

Ok I figured out how to prolong it for 12 hits but how do I delete the fall animation? Can someone tell me which is it?