say when my character taunted, it played a sound that last, let's say 3 seconds. If you punch him and he's out of his taunt state, the sound is still playing. How does one interrupt sounds in mugen?
Code: [State 195]type = stopsndtrigger1 = stateno != 195channel = [whatever channel your sound was on]
Bannana said, August 25, 2015, 09:09:10 pmCode: [State 195]type = stopsndtrigger1 = stateno != 195channel = [whatever channel your sound was on]thanks!
correction, put it in your -2 or -3if you use what I wrote you wouldn't be in state 195 so it won't trigger.
Bannana said, August 25, 2015, 09:40:12 pmcorrection, put it in your -2 or -3if you use what I wrote you wouldn't be in state 195 so it won't trigger.?
Yeah, basically what I messed up when I first wrote it is that I had the state as 195, so you would have to be in state 195 for the sound to stop. If you're hit out of or exit the taunt state (195), MUGEN won't recognize it because you're not in the state, so the sound would still be playing.If it's in -2 it is not part of that state (195) and will be checked every tick of gametime separately, so if you're in state 195 and exit it early the sound will stop.so hereCode: [State -2 stop taunt sound]type = stopsndtrigger1 = stateno != 195channel = [whatever channel your sound was on]I actually think it's a little annoying because you if have any other sounds on that channel they won't play at all because of the code. If only we could have MUGEN cache sound IDs so you could stop individual sounds. Just make sure it doesn't share a channel with other sounds.
The only thing is to use another channel, it's like an ID for the sounds.How many channels are you allowed to have in a character? You have -1, 0, then up to 31. Is this correct?So the channels are-1 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31and if you put 32 there's debug flood saying "ILLEGAL PLAYSND CHANNEL".
I can't find a specified number in the state control docs so I'm unsure.edit: Ah alright, I was about to test it myself
I checked the docs too, but there's nothing, so I tested it with a character and that seems the limit.