News:

MFG's Character of the Month: October 2026 Nominations

Main Menu

attack glitch

Started by jinnwriter, July 25, 2009, 08:48:52 PM

Previous topic - Next topic

jinnwriter

(Reposting from different thread)

I'm building a character right now, and whenever that character makes a jump attack, it seems to leave a sprite of the character in the middle of the air when it hits.  anyone have any idea why this is happening?  what can I do to fix this?



XsLaught

It may be that it's hitting a helper that doesn't have a NotHitBy or proper HitOverride. Check your helpers.

jinnwriter

Where do I check helpers?  I did a search on the word 'helper' in both the constants and the commands but I turned up nothing.

Byakko

Post your attack state.
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.

jinnwriter

; Jump Light Punch
; CNS difficulty: easy
[Statedef 600]
type    = A
movetype= A
physics = A
juggle  = 2
poweradd= 11
ctrl = 0
anim = 600

[State 600, ]
type = PlaySnd
trigger1 = Time = 1
value = 0,0

[State 600, ]
type = HitDef
trigger1 = Time = 0
attr              = A, NA
damage            = 10,0
animtype          = Light
getpower          = ifelse(var(35)=1,0,30),ifelse(var(35)=1,0,10)
guardflag         = HA
priority          = 3
pausetime         = 8,10
sparkno           = s(var(43))
sparkxy           = -5,-35
guard.sparkno     = s4216
hitsound          = s0,3
guardsound        = s0,10
ground.type       = High
ground.slidetime  = 7
ground.hittime    = 10
ground.velocity   = ifelse(var(35)=1,-1,-4),0
air.velocity      = -1.3,-3

[State 600, 5]
type = CtrlSet
trigger1 = Time = 20
value = 1




all of my air attacks have the same glitch, but all of my air attacks also have the exact same HitDef at the moment.  think that might be the problem?

Byakko

sparkno           = s(var(43))
What's the value of var(43), and do you have the animations that fit with whatever value this var has
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.

jinnwriter

aha, yeah, I didn't have anything that fits that spark value.  when I set it to 0, the glitch dissapeared.
where do you set the sparks and such if I want them?

Byakko

Most people add animations from the original game into their character (you just add the sprites and make an animation like any other animation, like an explod), although you can use animations from your fightfx files (.sff and .air) - but do note that doing so makes your character use the fightfx of the current screenpack, which means that if another person has a different screenpack with a different fightfx, he will see his sparks and not yours. For more info on how to do it, read the docs on hitdef and look at the sparkno parameter.
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.

jinnwriter

sorry, where can I find those documents?

Rajaa Retired

They're in a folder that should come with your mugen.

Byakko

alternatively, they're here on Guild http://mugenguild.com/docs go to sctrls.html
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.

jinnwriter

found it!  I will try studying these documents.  Thanks for your help, guys!

jinnwriter

Not sure if anyone will see this, but I have a new question.

Makoto seems to attack twice whenever she attacks in the air.  I only want her to attack once.  Why is she doing this, and what can I do to fix this??

Byakko

The animation loops because it doesn't end with a frame that lasts -1 ticks. If it has a finite looptime (i.e. it never loops and the last frame doesn't last -1 tick), what do you expect it to do when it finishes the animation ? You don't know ? Well, Mugen doesn't know either, so it plays the animation again. What you want is probably to have her go into her regular jump animation, at the end, the part where she's going down. Either use the same sprites in the animation (and have it loop on these sprites) or put a changeanim sending to that anim at the correct animation element (the sprites where she's going down) and have it loop.
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.

jinnwriter

I found another solution!
Apparently, using ChangeState and messing with !AnimTime will also let me do this.  Thank you for your help!  : D