This is something that should be simple for me to fix, but I just can't seem to get it to work the way I want it to.My character has a new move that hits 4 times and then puts the opponent into a custom "shake" animation on hit 4. They then change to a normal hit state and slide back a bit before resuming their neutral state.The problem is, I can't seem to get it to ignore airborn opponents. If this move hits and opponent who's in the air, it will cause them to walk on the air until they jump or get knocked down.[mcode];fourth hit[State 223, 5]type = HitDeftrigger1 = AnimElem = 8attr = S, NAdamage = 8, 2animtype = lightguardflag = MAhitflag = MAFpriority = 3, Hitpausetime = 7, 1sparkno = 0sparkxy = -10, -76hitsound = s4, 8guardsound = 6, 0ground.type = Highground.slidetime = 5ground.hittime = 1ground.velocity = -5, 0airguard.velocity = -1.9,-.8air.type = Highair.hittime = 10getpower = 20,10p2statetype = 224[State 223, statetypeset]type = StateTypeSettrigger1 = AnimElem = 9movetype = I[State 223, end]type = ChangeStatetrigger1 = AnimTime = 0value = 0ctrl = 1;Player 2 hitshake[Statedef 224]type = Amovetype= Hphysics = Svelset = 0,0ctrl = 0anim = 224[State 224, 2]type = ChangeAnimtrigger1 = Time = 15value = 5010ctrl = 0[State 0, VelAdd]type = VelAddtrigger1 = Time = 15x = -3y = 0ignorehitpause = 1persistent = 1[State 224, end]type = Selfstatetrigger1 = Time = 25value = 0ctrl = 1[/mcode]I've tried playing the anim within the state under a trigger, but if I do it that way, the character just pauses, they don't actually shake.224 is the custom hit state. It's just a 2 frame loop of the character's mid hit shaking back and forth.Mod edit: mcode tags, code seems to break for IE.
if it's putting the opponent into a custom state make sure the custom state has statetype=A when the opponent i in the airfor example you could use stand when they enter the state, but the stateypeset sctrl would be triggered by say, when enemynear, pos <0so when they are hit in the air it registers as an air hitstate.
No custom state and pausetime = 1,25won't work?Otherwise in the changestate.value = ifelse(pos Y!= 0, 50,0)
Cyanide said, July 31, 2008, 05:21:53 amNo custom state and pausetime = 1,25won't work?Otherwise in the changestate.value = ifelse(pos Y!= 0, 50,0)This works nicely, but it makes it look quite weird when it hits an airborn opponent. They take 4 hits from this move, do a "standing" stun animation in the air and then drop like a rock.The reason I didn't want to use a 1, 24 stun time is because Mugen's default hitpause doesn't give the sort of effect I was looking for. The opponent doesn't "shake" back and forth.What I really want is for this move to do the dramatic pause when it hits opponents who are grounded, but to just knock them away normally when they're in the air.Is there any way for me to get the opponent into state 244 ONLY when they're on the ground?Edit: actually, I would really like for this move to send an airborn opponent SPINNING. Like a wall bounce from Eternal Fighter Zero. What kind of velset do I need to use in order to make the opponent spin like a pinwheel?
To get the opponent spinning you would change the animtype in the hitdef to "diagup" also add a fall to the hitdef for it to look correctly.
RajaaBoy said, July 31, 2008, 08:18:36 amTo get the opponent spinning you would change the animtype in the hitdef to "diagup" also add a fall to the hitdef for it to look correctly.No I don't mean the diagup style spin, I'm talking about the "wallbounce" effect from EFZ and IaMP where the opponent's whole sprite is made to rotate.http://www.youtube.com/watch?v=UtrTjy9xrQkat 0:38
i that case... you'll definitely need a customstate-you need an custom state animations to where the opponent is knocked into the wall-you know how to add a custom state flag to the hitdef.-the custom state you activate should have a velset at an appropriate speed towards the wall-you need a change state trigger saying when target,backedgbodydist<=0, to change to a state where they bounce of the wall-in the new state you well set more velocity sctrls bringing the opponent up then using gravity or veladd to bring the opponent to the ground-also for this new state you want to make an animation, that shows the opponent spinning so you need to use the Horizontal and vertical rotations for the sprites in the animations portraying spinning.the required sprites i would use for this would be between 5030's/5060's-then for them to hit the ground you use a self state, triggering with pos y>=0&&vel y>0Also for a basic hitwall code you coul look at Dshiznetz/alejandro's Lucario he has a pretty basic one, it's in the release thread somewhere.
Thanks. I only want the spin. It's not a wall bounce. When this attack hits an airborn opponent, I want them to go into a spin.Is there also a way to set the opponent to default physics after they come out of custom state 224?
Ryanide said, July 31, 2008, 08:50:13 amThanks. I only want the spin. It's not a wall bounce. When this attack hits an airborn opponent, I want them to go into a spin.Is there also a way to set the opponent to default physics after they come out of custom state 224?just use the gravity sctrlCheers,Rajaboy
I'm still having a hard time getting this attack to behave the way I want it.And I still don't know how to make that "spin" lol. I think I'll just download a character who has this in their moveset and see how it's done.
Gonna go through each problem and define how to do it each time.Getting p2 to not recieve the custom state if hit in the airp2getp1stateno = ifelse(enemynear(0), statetype = A, 0,1)I'd use target, but that would bug out if only the 4th hit made contact.Making p2 spin but only if hit in midair (you wanna make things complex don't you)remove previous line given and the p2stateno bit, lets do the easy method. ID that hitdefID = 223Now, set this uptype = targetstatetrigger1 = numtarget(223) > 0trigger1 = target(223), statetype = Avalue = spinning statetype = targetstatetrigger1 = numtarget(223) > 0trigger1 = target(223), statetype != Avalue = normal shakeAs for making p2 spin, well if they HAVE the diagup hitanims, check for those, that's a spin generally. in the customstatetype = changeanimtrigger1 = time = 0 && selfanimexist(5061)value = 5061Otherwise you'll have to... invent it using required sprites. Now depends on what sorta spin you want, if you want them spinning around themself, difficult. If you're after a more generic and slightly crappier spin use something like sprite 5031, 20 then use angledraw and angleadd in the custom state to make them spin around their axis.When pos Y>= 0 you put them in selfstate 5100 so they bounce.Default physics? Explain please.
Once again, thanks for your help cyanide, but I worked it out on my own.The attack behaves fine now. I figured out how to create a spinning state using a combination of Angledraw and gravity.