Jump to content
  • 0

Yet another sound problem -__-


Ultra Fatality

Question

So as time goes by i learned how to code much needed things into the game itself like certain special effects that happen in the game only or certain animations which is saving the characters a lot of memory now the only problem im having is having certain sounds play in the game when certain things happen like low health or stage transactions all that im at a compleatly lost on that i got the sound to play when you or p2 are at low health but it kinda echos making it really loud and the music on the stage doesn't stop so if anyone can help let me know if u need to see the code i'll post it\

 

 

 

 

P.S. im trying to make blood hitsparks show and hit the ground but lost there as well not sure if it can be done in game i think it has to be because when i add blood sparks to a character and he fights someone with green blood red blood comes out instead so if anyone could help with that to that'd be great

Link to comment
Share on other sites

6 answers to this question

Recommended Posts

  • 0

Okay, it looks like a Helper state controller usage.

 

If it is using a Helper state controller then you might want to do these:

 

1) Make an Action in your .air file:

[begin Action 4026] ;make sure no other Action using the same 4026 number
-1,0, 0,0, -1

 

2) Add a Helper state controller in your .cns file, somewhere under the [statedef -3] line:

[state -3, Wasteland Danger Sound Helper]
type = Helper
triggerall = NumHelper(4026) = 0
trigger1 = (TeamMode = Single) || (TeamMode = Turns)
trigger1 = Life < 150 || P2Life < 150 ;when P1 and P2 lives are below 150
ID = 4026  ;make sure no other Helper using the same 4026 ID
stateno = 4026  ;make sure no other Helper using the same 4026 StateDef number
helpertype = normal
name = "Wasteland Danger Sound Helper"
pausemovetime = 999
supermovetime = 999
ignorehitpause = 1
persistent = 0

 

3) Add the Helper state controller StateDef 4026 (make sure no other Helper using the same 4026 StateDef number) in your .cns file, anywhere but under [statedef -2] line and [statedef -3] line:

[statedef 4026]
type = U
movetype = I
physics = N
anim = 4026

[state 4026, PlaySnd]
type = PlaySnd
trigger1 = Time = 0
value = F7,2   ; you can change it to another set in your .snd file and take out the "F" since "F" sound is from data/common.snd
abspan = 0
freqmul = 0.5
loop = 0  ;don't use the value of 1
volume = 50  ;change it to whatever value you want from 0 to 100
ignorehitpause = 1
persistent = 0

[state 4026, AssertSpecial]
type = AssertSpecial
trigger1 = Time <= 30  ;change it to whatever value which is how long the sound lasts
flag = nomusic
ignorehitpause = 1
persistent = 1

 

[state 4026, DestroySelf]
type = DestroySelf
trigger1 = (root, RoundState = [0,1]) || (RoundState = [0,1])  ;some safety measure, you can try to improve it
trigger2 = root, StateNo = 5900  ;some safety measure, you can try to improve it
trigger3 = root, StateNo = [190,194]  ;some safety measure, you can try to improve it
trigger4 = root, Life >= 150  ;when P1 life is at least 150
trigger4 = P2Life >= 150  ;when P2 life is at least 150
ignorehitpause = 1

 

P.S.  This Helper state controller usage works for P1's low life or P2's low life (playing the sound one time only), not both.  If you want it to work for both P1 and P2's low lives (playing the sound two times only), then you may need to make double Helpers -- one for P1 (Statedef 4026) and one for P2 (i.e. Statedef 4027).  If you or other MFFA members can come up with a more convenient way then please post it here too.

Link to comment
Share on other sites

  • 0

Alrighty then

 

;=============================================Danger Themes================================

;[state -3, Wasteland Danger Sound]

;type = PlaySnd

;;trigger1 = var(20) = [1,999]

;trigger1 = Parent, life<150

;trigger1 = (TeamMode = Single) || (TeamMode = Turns)

;trigger1 = var(26) < 1

;value = F7,2

;abspan = 0

;freqmul = 0.5

;loop = 1

;volume = 50

;ignorehitpause =

;persistent =

 

[state -3, AssertSpecial]

type = AssertSpecial

trigger1 = 1 && life=[1,150]

flag = nomusic

ignorehitpause = 1

persistent = 1

 

like i said it plays at the right moment but doesn't shut the stage music off and it keeps echoing making it play over and over eventually making so damn loud it cancels all game sounds

Link to comment
Share on other sites

  • 0

Alright and by the way i am using it within the game its a built in danger sound dont worry i know what im doing cept with the sound of course but yeah i will let you know if it works and yeah i only want it to play once for when whoever gets lower then 150 first and keep playing till someone dies and to think ahead of time if it doesn't work built in then its cool still got the codes and stuff

Link to comment
Share on other sites

  • 0

Alright it worked but o_0 it plays twice like when p2 gets lower then 150 it plays then lets say p1 gets lower then 150 it plays twice and doesn't cancel the first sound so other then that it worked just fine now i need to mess around with it and find out how to get it to play only on certain rounds certain time limits tag team modes, stages ugh so much to mess with but this is a big step on the danger sound im glad it worked 

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...