YesNoOk
avatar

Override Hit Sound With Another (Read 121 times)

Started by All-Star Platinum, February 10, 2019, 09:50:17 pm
Share this topic:
Override Hit Sound With Another
#1  February 10, 2019, 09:50:17 pm
  • **
  • "Guaranteed to blow your mind."
    • Canada
Hello,

So I have a super move developed that is supposed to play a sound (duration around 3 seconds) until the move is complete. Everything works as normal except when the attack hits the opposing character, all that plays is the hit noise instead of both at the same time (except when set to 0)

Posted below is the code I am working with:

[StateDef 3101]
type = S
movetype= A
physics = N
juggle  = 0
velset = 0,0
ctrl = 0
anim = 3101
poweradd = 0
sprpriority = 3

[State 3005, Sound]  ;SOUND I AM TRYING TO FIX
type = PlaySnd
trigger1 = Time = 1
value = s6000, 0+random%2
volume = 999
channel = 3

[State 3101, PosSet]
type = PosSet
trigger1 = Time = 0
y = 0
ignorehitpause = 1

[State 3101, NotHitBy]
type = NotHitBy
trigger1 = anim = 3101
value = ,NA,NT,ST
time = 2
ignorehitpause = 1

[State 3101, 1]
type = PosAdd
trigger1 = Anim = 3101
trigger2 = animelem = 4
persistent = 2
x = 7

[State 3101, PlayerPush]
type = PlayerPush
trigger1 = 1
value = 1
ignorehitpause = 1

[State 3102, Color]
type = PalFX
trigger1 = Time = 0
time = 150
add = 100,0,0
sinadd = 0,255,0,5

[State 3339, 6]
type = HitDef
trigger1 = Anim = 3101
trigger2 = Time = 1
attr = S, SA
hitflag = MAFPD
animtype  = Hard
damage    = 3,0
getpower  = 0
priority  = 6
guardflag = MA
pausetime = -5,-5
sparkxy = -25,-60
hitsound   = s6, 22  ;CONFLICTING NOISE
guardsound = 6,0
ground.type = Low
ground.slidetime = 12
ground.hittime  = 12
ground.velocity = -0,-0
ground.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
air.cornerpush.veloff = 0
air.velocity = -0,-0
fall = 0
fall.recover = 0
sprpriority = 3

[State 3101, Bind 1]
type = TargetBind
trigger1 = anim = 3101
pos = 0,0

[State 3101, end]
type = ChangeState
trigger1 = Time = 150
value = 0
ctrl = 1


Any help would be greatly appreciated. Thanks

-A.S.P


edit:

I tried changing the channel to 2 and 3 and it didn't affect anything
Last Edit: February 12, 2019, 02:05:44 am by All-Star Platinum
Re: Override Hit Sound With Another
#2  February 11, 2019, 12:45:00 am
  • ****
  • Vs Style Debuts Tag Project CEO
  • The Dark Wolf Returns
    • USA
What you should do is this:
Code:
[StateDef 3101]
type = S
movetype= A
physics = N
juggle  = 0
velset = 0,0
ctrl = 0
anim = 3101
poweradd = 0
sprpriority = 3

[State 3005, Sound]
type = PlaySnd
trigger1 = Time = 1
value = s6000, 0+random%2
volume = 999
channel = 3

[State 3005, Sound]  ;Add this for hit sound
type = PlaySnd
trigger1 = movehit
value = s6,22
volume = 999
channel = 3
ignorehitpause=1
persistent=0

[State 3005, Sound]  ;Add this for guard sound
type = PlaySnd
trigger1 = moveguarded
value = f6,0
volume = 999
channel = 3
ignorehitpause=1
persistent=0

[State 3101, PosSet]
type = PosSet
trigger1 = Time = 0
y = 0
ignorehitpause = 1

[State 3101, NotHitBy]
type = NotHitBy
trigger1 = anim = 3101
value = ,NA,NT,ST
time = 2
ignorehitpause = 1

[State 3101, 1]
type = PosAdd
trigger1 = Anim = 3101
trigger2 = animelem = 4
persistent = 2
x = 7

[State 3101, PlayerPush]
type = PlayerPush
trigger1 = 1
value = 1
ignorehitpause = 1

[State 3102, Color]
type = PalFX
trigger1 = Time = 0
time = 150
add = 100,0,0
sinadd = 0,255,0,5

[State 3339, 6]
type = HitDef
trigger1 = Anim = 3101
trigger2 = Time = 1
attr = S, SA
hitflag = MAFPD
animtype  = Hard
damage    = 3,0
getpower  = 0
priority  = 6
guardflag = MA
pausetime = -5,-5 ;I recommend you fix this. Never seen negative pausetimes
sparkxy = -25,-60
hitsound   = -1 ;This is to stop the hitsound from playing by default, same with the guard sound.
guardsound = -1
ground.type = Low
ground.slidetime = 12
ground.hittime  = 12
ground.velocity = -0,-0
ground.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
air.cornerpush.veloff = 0
air.velocity = -0,-0
fall = 0
fall.recover = 0
sprpriority = 3

[State 3101, Bind 1]
type = TargetBind
trigger1 = anim = 3101
pos = 0,0
ignorehitpause = 1 ;Add this

[State 3101, Bind 1] ;Add this to prevent the hitsound and guardsound from playing continuously
type = Movehitreset
trigger1 = movecontact
ignorehitpause = 1


[State 3101, end]
type = ChangeState
trigger1 = Time = 150
value = 0
ctrl = 1

Hope this helps.
Beware the Dark Wolf once more!
Re: Override Hit Sound With Another
#3  February 11, 2019, 02:59:09 pm
  • *****
  • Shame on you!
    • USA
I've had to make custom sounds for my Noob Siabot. I was activating too many sounds too fast. But I was up around 4 or 5 at one time.
All of my sounds would play. Everything would work normal IF I hit the Pause key and let each individual sound play.
Try testing your sound(s) that was. As soon as you start the move press Pause and let the sound play out. (Sounds still play during pause)
Then see if the 2nd sound will play.

I have a feeling it might not be the number of sounds playing, but the total file size of the sounds playing.
vVv Wheat Stage Released vVv
Re: Override Hit Sound With Another
New #4  February 12, 2019, 02:05:11 am
  • **
  • "Guaranteed to blow your mind."
    • Canada
Thanks DarkWolf13, I tweaked the code a bit and fixed some channels and the shit sounds clean.  :8):

I also fixed those -5 pause times lol I'm still learning to code (ish)

all is well thanks for everyones help

-A.S.P
Last Edit: February 13, 2019, 05:12:09 am by All-Star Platinum