Posted by supercain
in about helpers and playsnd (Started by supercain May 03, 2020, 12:18:01 am
Board: M.U.G.E.N Development Help
Board: M.U.G.E.N Development Help
I have a helper that whenever it goes to state 9000 it plays a track (finish him music) but it should turn it off as the enemy falls down. I have that part right with stopsnd. However, as for the second enemy, the music wont play at all even if conditions are met. Helper is like this:
Code:
[state -2, 1]
type = Helper
trigger1 = target,life = 1 ;for single mode (no problem here)
trigger2 = !enemy(0),alive || !enemy(1),alive ;for simul mode (no problem for the first defeated enemy)
trigger2 = target,life = 1
ID = 9007
stateno = 9000
ownpal = 1
ignorehitpause = 1
[Statedef 9000]
type = S
movetype= A
physics = S
velset = 0,0
anim = 888
ctrl = 0
[State 2, 5.999]
trigger1 = time = 0
value = F40, 0
Channel = 0
loop = 1
volumescale = 200
[State -2, stop]
type = stopsnd
trigger1 = enemy(0),stateno = 5150 ;stop track as enemy 0 falls down
trigger2 = enemy(1),stateno = 5150 ;stop track as enemy 1 falls down
channel = 0
persistent = 0
if I defeat enemy 0 the track will start playing until enemy 0 falls down. Then I defeat enemy 1 and the track should play again but it wont. Whats wrong? Seems like if the track would remain silent after stopping it the first time. Isnt it supposed to restart?
Thank you.