• Welcome, Guest. Please login.
 
April 25, 2024, 03:58:34 AM

News:

If you have problems logging in, contact an administrator.


SvC Style HitSound System.

Started by Deleted User, June 18, 2006, 08:53:17 PM

Previous topic - Next topic

Deleted User

As you know, or noticed, SvC has 2 or sometimes 3 predifined hitsounds for the type of hit.

Generally it's as follows:

2 HitSounds for Light/Medium Attacks
3 HitSounds for Hard Attacks

How do we represent this effect in Mugen?
With the Next Code in your hitsound parameter in your hitdef:

Quotehitsound = sW,ifelse(Random<=500,ifelse(Random<=500,X,Y),Z)

"W" is the group number where your hitsounds are located, if you use group "3" the code would be as follows:

Quotehitsound = s3,ifelse(Random<=500,ifelse(Random<=500,X,Y),Z)

Where do i define the sounds? Easy.
X is the first sound to be played.
Y is the second
Z is the last one.

This could be any number as long as that Sound exists in that group : 1,2,3 or 1,5,9 or 3,5,2

So if you want to play sound 1,2 and 3 it would be as follows:

Quotehitsound = s3,ifelse(Random<=500,ifelse(Random<=500,1,2),3)

What does it do?

Let's see:

The first ifelse chooses between the Second Ifelse or number 3 in a 50 % Chance.
If it chooses Ifelse 2 (ifelse(Random<=500,1,2)) this one will choose between sound 1 and 2 in a 50% Chance

Remember that ifelses are chainable, and easy to use.
Check trigger documentation for more info on "ifelse"
Trigger thanks to Caddie.