YesNoOk
avatar

Help with midair hyper attack. (Read 388 times)

Started by I am The Master Donut, October 16, 2009, 01:29:58 am
Share this topic:
Help with midair hyper attack.
#1  October 16, 2009, 01:29:58 am
  • ****
  • .....meh
 Ok i coded this hyper attack and when I tested it my MUGEN crashes the minute it loads my character but no error appears so I can't find out the problem. Here is the code. [mcode][StateDef 568]
type = A
movetype= A
physics = A
juggle  = 1
velset = 0,0
ctrl = 0
anim = 568
sprpriority = 2

[State 568, SuperPause]
type = SuperPause
trigger1 = animelem=1
time = 30
anim = 566
pos =0,0
darken = 1
p2defmul = 0
poweradd = -2000
unhittable = 1

[State 568, 1]
type = HitDef
trigger1 = AnimElem = 3||AnimElem = 4||AnimElem = 5||AnimElem = 6||AnimElem = 7||AnimElem = 8||AnimElem = 9||AnimElem = 10||AnimElem = 11||AnimElem = 12||AnimElem = 13||AnimElem = 14||
attr = S, HA
damage = 67
animtype = Light
guardflag = MA
hitflag = MAF
priority = 3, Hit
pausetime = 10, 10
sparkno = 0
sparkxy = -10, -76
hitsound = 5, 0
guardsound = 6, 0
ground.type = High
ground.slidetime = 5
ground.hittime  = 12
ground.velocity = -4
airguard.velocity = -1.9,-.8
air.type = High
air.velocity = -1.4,-3
air.hittime = 12

[State 568, end]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1
;----------[/mcode]
Edit: ok I found out why it crashes. I had to remove the extra "||" after "animelem=14" in the hitdef but now the character won't do the attack!
I will force feed Dark Pit right into your ass if we ever play on wi fi.
Last Edit: October 16, 2009, 01:33:52 am by MARIO/SONICFAN13
Re: Help with midair hyper attack.
#2  October 16, 2009, 01:58:04 am
  • ******
  • Legendary XIII
  • I am the eye of the storm to come!
    • New Zealand
    • network.mugenguild.com/cyanide/
Check your changestate then. If it was crashing before it would have been straight away. So now it's not the attack is valid, but you've stuffed up in how you access the attack.

Triggers are important.


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.
Re: Help with midair hyper attack.
#3  October 16, 2009, 02:14:20 am
  • ****
  • .....meh
Check your changestate then. If it was crashing before it would have been straight away. So now it's not the attack is valid, but you've stuffed up in how you access the attack.

Triggers are important.

Are talking about this part of the code?[mcode]trigger1 = AnimElem = 3||AnimElem = 4||AnimElem = 5||AnimElem = 6||AnimElem = 7||AnimElem = 8||AnimElem = 9||AnimElem = 10||AnimElem = 11||AnimElem = 12||AnimElem = 13||AnimElem = 14[/mcode]
I will force feed Dark Pit right into your ass if we ever play on wi fi.
Re: Help with midair hyper attack.
#4  October 16, 2009, 02:18:48 am
  • ******
Quote
physics = A
Considering the velset and the changestate at the end it heavily looks like this move is NOT done while in the air, but on the ground.
What happens when you have physics set to A (which means air) and you are on the ground ? You land. So you go into the state, but you simply immediately land. So you don't see yourself go into this attack state.
Change the physics to S if you do this move while standing.
By the way, you should optimize your triggers. animelem = 3 || animelem = 4 etc. is to be shortened into AnimElem = [3,14] or "animelem >= 3 && animelem <= 14". Or at least it would be if this didn't look a bit bad for a hitdef trigger. Considering the hit velocity of -4 and how your character has a velset of 0 so he doesn't move forward, I presume the attack is supposed to push the opponent back and hit just once. Well, a hitdef is activated only once and turns itself off only after it hits (or after you leave the statedef you are in). So you need to activate it only once and then forget it. Here, you just replace the entire trigger with animelem = 3. The hitdef will stay on for the rest of the animelems or until it hits, and it will hit only once. I presume this is what you're trying to do, unless it's a move with a huge clsn1 box that will do a ton of total damage as it hits 12 times (a total of about 800 damage). .... Then again considering it's a supermove that takes off 200 power, maybe that's what you want. But 800 damage is really big.
If I struggled to the end of my determination, to the end of my way of life with my followers, if the result is ruin, then this ruin is inevitable. Grieve. Shed tears. But you cannot regret.
Last Edit: October 16, 2009, 02:30:24 am by Byakko
Re: Help with midair hyper attack.
#5  October 16, 2009, 02:20:10 am
  • ****
  • .....meh
Quote
physics = A
Considering the velset and the changestate at the end it heavily looks like this move is NOT done while in the air, but on the ground.
What happens when you have physics set to A (which means air) and you are on the ground ? You land. So you go into the state, but you simply immediately land.
Change the physics to S if you do this move while standing.
I want the character to do the move IN midair.
EDIT:BTW Yes I am trying to make it hit multiple times
EDIT2: "The hitdef will stay on for the rest of the animelems or until it hits, and it will hit only once. I presume this is what you're trying to do, unless it's a move with a huge clsn1 box that will do a ton of total damage as it hits 12 times (a total of about 800 damage). .... Then again considering it's a supermove that takes off 200 power, maybe that's what you want. But 800 damage is really big."

What I do is trial and error. If it takes too much damage then I change it and test it again.
I will force feed Dark Pit right into your ass if we ever play on wi fi.
Last Edit: October 16, 2009, 02:36:33 am by MARIO/SONICFAN13
Re: Help with midair hyper attack.
#6  October 16, 2009, 02:51:57 am
  • avatar
  • **
What are the triggers to go into the move in the .cmd? Perhaps there might be an error there that contributes to the problem.
Re: Help with midair hyper attack.
#7  October 16, 2009, 05:35:01 pm
  • **
Is your character supposed to stay at the same position during the move? Because in that code with physics = A, gravity will be added to the character and it will go immediately into the land state after it reaches the ground (which will take no time if you are in mid air).

I guess you want it to stay in the air, so you should use a velset controller that sets the y vel to zero during the move, or even set physics = N and handle the (landing) velocities yourself.
Then you should not go into state 0 (standing) at the end of course, unless you actually are standing.

Also, the animelem trigger sausage could be shortened with some trigger tricks.
You could use something like this:
[mcode]trigger1 = AnimElemTime(AnimElemNo(0)) = 0
trigger1 = AnimElemNo(0) = [3,14][/mcode]

Latest Creation: SSBB Assist Trophies
Re: Help with midair hyper attack.
New #8  October 16, 2009, 09:50:43 pm
  • ****
  • .....meh
Is your character supposed to stay at the same position during the move? Because in that code with physics = A, gravity will be added to the character and it will go immediately into the land state after it reaches the ground (which will take no time if you are in mid air).

I guess you want it to stay in the air, so you should use a velset controller that sets the y vel to zero during the move, or even set physics = N and handle the (landing) velocities yourself.
Then you should not go into state 0 (standing) at the end of course, unless you actually are standing.

Also, the animelem trigger sausage could be shortened with some trigger tricks.
You could use something like this:
[mcode]trigger1 = AnimElemTime(AnimElemNo(0)) = 0
trigger1 = AnimElemNo(0) = [3,14][/mcode]



Ok I did a velset and my character did the move but here's what happened after the attack.
heres the velset [mcode][State 568, VelSet]
type = VelSet
trigger1 = AnimElemNo(0) = [1,14]
x = 0
y = 0[/mcode]
EDIT: nvm
 I fixed it.
I will force feed Dark Pit right into your ass if we ever play on wi fi.
Last Edit: October 16, 2009, 10:01:02 pm by MARIO/SONICFAN13