charge attack issue

Started by eishiba, April 06, 2020, 04:25:53 AM

Previous topic - Next topic

eishiba

Whats the trick to making a charge attack. As in, running at your opponent to hit them with your fist or shoulder, and NOT a charge move like charging power. When my character uses the charge move I designed, he appears back in near my end of the arena. I can get up close and use the attack and I appear at the end of the arena.

[Statedef 350]
type    = S
movetype= A
physics = N
juggle  = 4
poweradd= 30
ctrl = 0
anim = 350
sprpriority = 2


[State 350, 0]
type = PlaySnd
trigger1 = Time = 2
value = 0, 4

[State 350, 0]
type = HitDef
trigger1 = AnimElem = 1
attr = S , NA
animtype  = Heavy
damage    = 57
guardflag = MA
pausetime = 10, 10
sparkno = S8000
sparkxy = -30,-50
hitsound   = 5,2
guardsound = 6,0
ground.type = High
ground.slidetime = 11
ground.hittime  = 10
ground.velocity = -5000, -5
air.velocity = -2.5,50



[State 350, 0]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1
;---------------------

Odb718

Seeing there's no Vel X being set, I'm assuming you've made an animation that moves right on the X axis. Right?
I would describe it as a "rush in" move btw.

Look into redoing your animation. You might just want to copy/paste it into a new animation and adjust the X placements back to 0.
Then use VelAdd or VelSet a few times to control where you are. You'll want a velset at the beginning and end of the state. You might want to use a few to make things move a little more natural. Set the Vel X, then add a bit more speed after a step or something. Then a veladd until it reaches around 0 and then a velset to 0 to make the whole thing stop.

Do 2 at first, then mess around.
vVv Gouken718 vVv SabreTooth718 vVv


XGargoyle

these values are quite wonky, by the way:
ground.velocity = -5000, -5
air.velocity = -2.5,50


XGargoyle: Battle posing since 1979
http://xgargoyle.mgbr.net
http://www.pandorabots.com/pandora/talk?botid=e71c0d43fe35093a  <-- Please click that link
http://paypal.me/XGargoyle  <-- Donations welcome!

eishiba

Is it possible to make an attack that only happens while dashing forward?
Also, isnt it projhits that makes an attack hit multiple times?

Odb718

So with that question it sounds like you enter a dash state; Probably Statedef 100.
Then you press a button to do an attack. Right?
If you press the attack button and you teleport back to where you started, your statedef 100's animation/velset/posset is causing problems.

If you have specific questions about specific things in mugen code, you can use Mugen Class to read exactly what things do.
https://mugenguild.com/forum/topics/hitdef-sctrls-169450.0.html
and for Projectiles' attributes
https://mugenguild.com/forum/topics/projhit-triggers-169927.0.html

Look in the Master Thread for anything you want.
vVv Gouken718 vVv SabreTooth718 vVv


eishiba

Quote from: Odb718 on April 08, 2020, 06:34:56 AM
So with that question it sounds like you enter a dash state; Probably Statedef 100.
Then you press a button to do an attack. Right?
If you press the attack button and you teleport back to where you started, your statedef 100's animation/velset/posset is causing problems.

If you have specific questions about specific things in mugen code, you can use Mugen Class to read exactly what things do.
https://mugenguild.com/forum/topics/hitdef-sctrls-169450.0.html
and for Projectiles' attributes
https://mugenguild.com/forum/topics/projhit-triggers-169927.0.html

Look in the Master Thread for anything you want.

Well, I guess Im confusing people. I originally designed the attack to work like a "rush in" attack. But in the game in which im making the character when he dashs forward, he would use a stiff shoulder when you pressed the correct single button. In Mugen when you dash forward and use a single button attack you will use whatever your standing attacks are. So I decided to make the attack a rush in attack. But if i can make it work during a forward dash, i would rather do that.

MGMURROW

You can use something like this:

[State -1]
type =ChangeState
value =
triggerall = command = "a" && command = "holdfwd"  ;<------this code here for the dash shoulder move, swith 'command = "a"' for the button
trigger1 = StateType != A && ctrl

then for the corresponding normal attack (not the dash attack)

[State -1]
type =ChangeState
value =
triggerall = command = "a" && command != "holdfwd"  ;<------this code here for the normal move, swith 'command = "a"' for the button
trigger1 = StateType != A && ctrl

hope this helps

MGMURROW

eishiba

Quote from: MGMURROW on April 08, 2020, 11:02:57 PM
You can use something like this:

[State -1]
type =ChangeState
value =
triggerall = command = "a" && command = "holdfwd"  ;<------this code here for the dash shoulder move, swith 'command = "a"' for the button
trigger1 = StateType != A && ctrl

then for the corresponding normal attack (not the dash attack)

[State -1]
type =ChangeState
value =
triggerall = command = "a" && command != "holdfwd"  ;<------this code here for the normal move, swith 'command = "a"' for the button
trigger1 = StateType != A && ctrl

hope this helps

MGMURROW
this works quite well.  i didnt think about the holdfwd.