Infinity MUGEN Team

IMT Main => M.U.G.E.N Help => Topic started by: Alexziq on August 13, 2007, 02:59:43 PM

Title: How do I assign a sound to an attack?
Post by: Alexziq on August 13, 2007, 02:59:43 PM
I added my sounds to the sounds of my character in Fighter Factory but what designates the sprite that will signal the sound to trigger? If a laser blast emits in a special what do I put for group, and sound #'s and is there something else in the coding that has to be changed?
Title: Re: How do I assign a sound to an attack?
Post by: The Rippah, Roo'Jizah Panzermanathod on August 13, 2007, 03:08:14 PM
[State 220, PlaySnd]
type = PlaySnd
trigger1 =  AnimElem = 1
value = 0,27

By AnimElem, it's the frame of an attack you want the sound to play. by Value, it's group, sound.
Title: Re: How do I assign a sound to an attack?
Post by: Error Macro on August 13, 2007, 03:13:33 PM
You put the group number for the sound in the snd file.

Say:

The laser sound is

Group 3000, 0

In the cns you would put:

[State 3000, Playsnd]
type = PlaySnd
trigger1 = animelem = 6
value = S3000,0
volume = 0

the s tells mugen that the sound is in your character's snd file

This tells what frame will trigger the sound to play.
Title: Re: How do I assign a sound to an attack?
Post by: The Rippah, Roo'Jizah Panzermanathod on August 13, 2007, 03:21:31 PM
I don't think the "S" is needed. Ah well.
Title: Re: How do I assign a sound to an attack?
Post by: Alexziq on August 13, 2007, 03:31:15 PM
Easy, awsome

Last question

(AnimElem =) this is what designates the frame or sprite in the group, right? or does it need to be the sprite number in the group?
Title: Re: How do I assign a sound to an attack?
Post by: Error Macro on August 13, 2007, 03:32:14 PM
Yes
Title: Re: How do I assign a sound to an attack?
Post by: Alexziq on August 13, 2007, 05:14:57 PM
[State 3000, Playsnd]
type = PlaySnd
trigger1 = animelem = 6
value = S3000,0
volume = 0


This formula, I assume I would put this  info in the cns for the Sprite group, or anywhere?

Sorry, Im just trying to figure out how it knows what animation group its assigned to.

Say my Animation  is #8, frame 1 of 6, is that what Im puttin here?

trigger8 = animelem = 1

Or am i looking for the animation group in the cns?
Title: Re: How do I assign a sound to an attack?
Post by: Error Macro on August 13, 2007, 05:18:15 PM
No, you can put that anywhere in the state the sound be played in.
SimplePortal 2.3.5 © 2008-2012, SimplePortal