Home pg Contact - Contattami 

Vedi solo i tutorial che riguardano il:

Random Death Voice Tutorial - IT

Level Medium


The deafult mugen's death sound is 11,0 ( placed in the SND file of your character ), this mean that every time the character lose, mugen plays it. To make this code work rename or delete the 11,0 sound in your SND file.
The code was made by Cyborg_Mai and use one helper ( invisible )
For Cyborg-Mai I have choosen to you play 3 voice sample with the group 99999 starting from 0 to 2:


To make mugen choose one of them I used a trgger called " VarRandom " and setted the his range from 0 to 2 ( the number of my samples ).
I choose one helper.. beacuase helper's var are diffrent from player's one... this mean that you can have in the same time the same variable used ( es: var(1)= 5 )- read the tutorial inside the docs folder of mugen .

To call/summon the helper I have created a little code in the statedef -2 of CNS with the trigger !alive ( not live... or is dead ), as you can see in the down code

In the Air file I have putted a not used animation number with not existent frame numebers... because we don't need to see the helper... He must be invisible

The code is simple to let it work make attention to:

1) Not 11,0 sample must be added to the SND's Char

2) Set VarRandom in the correct way ( if we have 3 sample the range will be: range 0,2 or if we start the count from 1: range= 1,3 )

3) Put the sample in the SND with the correct group

I hope that this little tutorial can help you for the creation of you characters.
You can see the code working downloading Cyborg-Mai from Mugen/Characters section of this site.
Happy mugen
Kain the supreme


; the anim frames number goes here
[Begin Action 9999]
999, 999, 0, 0, 1

The code to insert in the CNS file

[Statedef 9998]
anim = 9999 ; air animation
ctrl = 0

; set the range of the varrandom
[State 9998, 1]
type = VarRandom
trigger1 = Time = 0
v = 1

range = 0,2

; play the sound
[state 9998, ps1]
type = playsnd
trigger1 = time = 0
value = 99999,var(1)

Put this code under the statedef -2 line ( [statedef -2 ] )
; Summon the helper when our character is dead
[State -2, helper]
type = Helper
triggerall = numhelper(99999)=0
trigger1 = !alive
helpertype = normal
name = "DIE_VOX_by_kainthesupreme"
id = 99999
postype = p1
pos = 0,0
stateno = 9998
keyctrl = 0
ownpal = 1

VirtualTek for Fighter Factory

Share |