Quick questions. I'm using Fighter Factory, and trust me when I tell you I've been desperately trying to avoid having to ask for help by reading the docs, but I just can't figure these two out:1. My character has a rising knee that is meant to act as an anti-air move (like a Dragon Punch). I've got it looking nice, but my only problem is that if he gets hit in the middle of the move, he remains in mid air where he got hit until I jump again. I've looked at the Gravity state and implemented that, but I guess I'm doing something wrong because he always stays in the air. I could just make him unhittable during the move, but that's not very fair.2. How do I add sounds for when my character gets hit and/or KO'd? Sorry if that's an easy one, I just can't find it. Thanks!
1. make it it an A (Air type) Move2. Add sounds to the commun1, for that just copy the commun1.cns form you data folder in mugen and paste in the char folder, then open the char, go to CNS, you see he now has an attack cns and a commun1 cns, then just use playsnds
ultimatedude said, September 04, 2007, 04:10:24 pm2. Add sounds to the commun1, for that just copy the commun1.cns form you data folder in mugen and paste in the char folder, then open the char, go to CNS, you see he now has an attack cns and a commun1 cns, then just use playsndsyou shuld use the statedef -3 or -2 instead.look in Kfm, he got the landing sound in statedef -3.
as far as the uppercut goes: ;;;regular punch dp 3000;[StateDef 3000]Type = SMoveType = Aphysics = NCtrl = 0PowerAdd = 0FaceP2 = 1HitDefPersist = 0MoveHitPersist = 0HitCountPersist = 0SprPriority = 2[State Anim ]Type = ChangeAnimtrigger1 = !time && Prevstateno != 1370Value = StateNo[State Vel ]Type = VelSetTrigger1 = !Time && Prevstateno != 1370X = 0Y = 0[State Idle ]Type = StateTypeSetTrigger1 = !AnimelemTime(7);stateType = UmoveType = I;physics = U[State Proper]Type = StateTypeSetTrigger1 = Pos Y < 0stateType = AmoveType = Aphysics = N[State Proper]Type = PosSetTrigger1 = Pos Y >= 0 && AnimElemTime(3) > 1Y = 0[State esp]Type = ChangeStateTrigger1 = Pos Y >= 0 && AnimElemTime(3) > 1Value = StateNo+1[State InitVel]Type = VelAddTrigger1 = AnimElemTime(3) = 1X = 2.9Y = -6.7[State AirFriction]Type = VelMulTrigger1 = AnimElemTime(3) > 1X = 0.96[State Accel]Type = VelAddTrigger1 = AnimElemTime(3) > 1Y = 0.62[State Counter Hit Damage]Type = TargetLifeAddTrigger1 = NumTargetTrigger1 = var(15) = 1Value = Floor(fvar(0)*39.2+(random*.001))Kill = 1Absolute = 0Persistent = 0[State hit ]Type = HitdefTrigger1 = !AnimElemTime(3)Attr = S, SAHitFlag = MAFGuardFlag = MAffectTeam = EAnimType = BackAir.AnimType = backFall.AnimType = backPriority = 3,HitDamage = Floor((49+((random%2)*9.8))*fvar(0)), Floor((9.8+((random%10)*.1))*(fvar(0)))PauseTime = Floor(fvar(3)*10),Floor(fvar(3)*12)Guard.PauseTime = Floor(fvar(3)*11), Floor(fvar(3)*11)SparkNo = 0Guard.SparkNo = 40sparkxY = 4,-60HitSound = 5, 0GuardSound = 6, 0Ground.Type = LowAir.Type = HighGround.SlideTime = 16Guard.SlideTime = 16Ground.HitTime = Floor(fvar(4)*16)Guard.HitTime = Floor(fvar(4)*16)Air.HitTime = Floor(fvar(4)*13)Guard.CtrlTime = 0Airguard.CtrlTime = 99999999Guard.Dist = 50YAccel = 0.636363625526428Ground.Velocity = -9.63655853271484, -8.96969699859619guard.Velocity = -12.61205725air.Velocity = -9.63655853271484, -8.96969699859619AirGuard.Velocity = -12.61205725, -8.96969699859619ground.cornerpush.veloff = -9Down.CornerPush.VelOff = -9Air.CornerPush.VelOff = 0Guard.CornerPush.VelOff = -9AirGuard.CornerPush.VelOff = -9Air.Juggle = 0SprPriority = 2;P1Facing = -1P1GetP2Facing = 0;P2Facing = -1;P1StateNo =P2StateNo = 5610P2GetP1State = 1;MinDist =;MaxDist =;Snap =ForceStand = 0Fall = 1fall.xVelocity = 0fall.yVelocity = 0Fall.Recover = 0Fall.RecoverTime = 9Fall.Damage = 0Air.Fall = 1down.Velocity = 0Down.HitTime = 9Down.Bounce = 0ID = 0chainID = -1nochainID = -1,-1HitOnce = 1Kill = 1Guard.Kill = 1Fall.Kill = 1NumHits = 1GetPower = Floor(fvar(5)*(78.125+(random*.001))),Floor(fvar(5)*(78.125+(random*.001)))GivePower = Floor(15.625+(random*.001)),Floor(15.625+(random*.001))Attack.Width = 5,5PalFx.Time = 9PalFx.Mul = 256,256,256PalFx.Add = 0,0,0;EnvShake.Time = 7;EnvShake.Freq = 20;EnvShake.Ampl = -2;Envshake.Phase = 0;Fall.EnvShake.Time = 7;Fall.EnvShake.Freq = 20;Fall.EnvShake.Ampl = -2;Fall.EnvShake.Phase = 0;;idle[StateDef 3001]Type = SMoveType = Iphysics = SCtrl = 0PowerAdd = 0FaceP2 = 0HitDefPersist = 0MoveHitPersist = 0HitCountPersist = 0SprPriority = 2[State Anim ]Type = ChangeAnimtrigger1 = !time && Prevstateno != 1370Value = StateNo[State esp]Type = PosSetTrigger1 = !timeY = 0[State esp]Type = VelSetTrigger1 = !timeX = 0Y = 0[State Anim ]Type = ChangeStateTrigger1 = AnimTime = 0Value = 0ctrl = 1this is composed by two animations.the first is the dp, from the ground and including the air framesanimelem 7 is the element in which iori is not able to hit anymore. animelem3 is the first element in which he moves to the air. you can disregard the hit and counter code, and put code of your own.the second is just the idle animation, for when he hits the ground and recovers.
The KO sound is 11,0. No need to code or alter common1.cns for that.For hit sounds, you can use the following code:[State -X, PlaySnd]type=PlaySndtrigger1=movetype=H ;the char is being hittrigger1=time=1 ;time=0 doesn't work in ngtive statestrigger1=time%2 ;to add randomness, so the sound is not played everytime your char is hitvalue = a,b
I appreciate everybody's help. The KO sound worked, and I fixed the Rising Knee with your help. However...QuoteIt was actually the very first result from a google search; Also note that it would have saved you the exersize of someone replying with advice that was as wrong as it was unhelpful if you had looked it up yourself...I'm not sure why you had to say this. I appreciate the help, but I don't see why it's a bad thing to come to a Message Board titled "Mugen Development Help," proceed to ask for said help, and then get told I would be better served doing Google searches instead. I came here to get a personal response to this specific situation, which I got and has truly helped a lot.Although as I look at it, I think it may be your signature. I don't understand why one would have such a signature, but if it is, disregard what I've said.
it IS my signature...spend a few mothsn in this community and you will understand.Renzo said, September 04, 2007, 06:04:33 pmThe KO sound is 11,0. No need to code or alter common1.cns for that.For hit sounds, you can use the following code:[State -X, PlaySnd]type=PlaySndtrigger1=movetype=H ;the char is being hittrigger1=time=1 ;time=0 doesn't work in ngtive statestrigger1=RANDOM%2 ;to add randomness, so the sound is not played everytime your char is hitvalue = a,brenzo: modified your code a bit to add some randomness
I misunderstood one of your past posts:http://mugenguild.com/forumx/index.php?topic=61543.msg510865#msg510865You said is not recommended to compare random against ranges of numbers, like random<600, but I understood sh1t instead of that, so I used time%2 Nevermind.
Well, I don't frequent message boards as much as some, so that's my fault that I didn't realize that was your signature. Thanks for the help and sorry about the misunderstanding.
Renzo said, September 04, 2007, 06:04:33 pm[State -X, PlaySnd]type=PlaySndtrigger1= Stateno = 5000;movetype=H ;the char is being hittrigger1=time=1 ;time=0 doesn't work in ngtive statestrigger1=time%2 ;to add randomness, so the sound is not played everytime your char is hitvalue = a,IfElse(random < 500,b,(IfElse(random < 500, c,d))3 sounds What about using state 5000 instead of Movehit = H?Cause there is more than 1 State right?And maybe he dont want the sound to be played on everything
Renzo said, September 05, 2007, 05:21:11 amI misunderstood one of your past posts:http://mugenguild.com/forumx/index.php?topic=61543.msg510865#msg510865You said is not recommended to compare random against ranges of numbers, like random<600, but I understood sh1t instead of that, so I used time%2 Nevermind.yah, let me explain a bit more on that. in your code you have.trigger1=time=1 ;time=0 doesn't work in ngtive statestrigger1=time%2 ;to add randomness, so the sound is not played everytime your char is hitthe second rtigger does nothing , as time increases arithmetically, like 1,2,3, etc..,meaning there is no real random factor on that, on top of it the trigger will only be checked when time = 1 so it will always trigger anyway, because time%2 = 1 when time = 1. if you had suggested gametime instead, it would be cool, though.what i said about comparing random is using it in the random < X or random =[x,y] manner, it is more common in random operation to get the mod like random%X instead, as random give a very big range of values, talking in the billions here.While in mugen's case it only goes 0-999, it has also been said (though not proven, but that part is easy) that mugen's random does not distribute the values evenly between 0 and 999, so yet another reason to use %.about this partvalue = a,IfElse(random < 500,b,(IfElse(random < 500, c,d))check the ai topic in development discussion as the properness of it is compromised depeneding on the results you want to achieve, currently it has a 50% chance of showing spark b, and 25% for both c and d.
You talking to me?I understood the whole thing after you posted the correction; my problem is sometimes I follow recommendations in a blind way