YesNoOk
avatar

charge attack issue (Read 3543 times)

Started by eishiba, April 06, 2020, 04:25:53 am
Share this topic:
charge attack issue
#1  April 06, 2020, 04:25:53 am
  • avatar
  • **
    • USA
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
;---------------------
Re: charge attack issue
#2  April 07, 2020, 08:09:20 am
  • *****
  • Shame on you!
    • USA
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 Ryuko718 Updated 10/31/22 vVv
Re: charge attack issue
#3  April 07, 2020, 10:23:17 am
  • ******
  • Hedgehog Whisperer
  • Red Bull addict
    • Spain
    • xgargoyle.mgbr.net
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!
Re: charge attack issue
#4  April 08, 2020, 04:47:20 am
  • avatar
  • **
    • USA
Is it possible to make an attack that only happens while dashing forward?
Also, isnt it projhits that makes an attack hit multiple times?
Re: charge attack issue
#5  April 08, 2020, 06:34:56 am
  • *****
  • Shame on you!
    • USA
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 Ryuko718 Updated 10/31/22 vVv
Re: charge attack issue
#6  April 08, 2020, 10:14:42 pm
  • avatar
  • **
    • USA
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.
Re: charge attack issue
#7  April 08, 2020, 11:02:57 pm
  • avatar
  • ***
    • https://sites.google.com/site/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
Re: charge attack issue
#8  April 09, 2020, 02:32:25 am
  • avatar
  • **
    • USA
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.