I've made my own finish/win code work in the MKP's common1.cns file when I make it at correct place it worked for all but now I decided to use the original code that comes with MKP 2.9, so that triggers match. A single win sound to play for specific stage will look like that:
[State 180, end music]
type = Playsnd
trigger1 = time = 0 && root,var(4) = 0 && prevstateno != 181
trigger1 = stagevar(info.name) = "pr1s0n"
value = f41,29
volumescale = 140
channel = 0
I have chars that I downloaded recent years and they are already v 1.0 and the sound plays instantly on Win with this code. Here in the video I show how the win sound is supposed to play when it works fine, for example the Green robot I took is already updated to 1.0
But old chars that did not use the shared file play it with some delay, as you can see there is some pause, no sound then the Wins is heard and the sound starts playing. This delay is what I want to fix
I found one first issue that prevented the Win from playing on Win state at all: Chars had in their main CNS a WIN code that had to be deleted , from
; WIN
[Statedef 180]
to Statedef 611 or maybe I need to keep the Intro too, but Win had to be deleted because they share it in the Common. The video shows both go through the same states. Again, the Purple is the one that has delay and I can't find all my converted chars from older MKP before they use the shared files have this delay. At least I fixed them to play music at all by deleting the Win state from their own CNS
So now they both use the shared Common.cns, here is a chunk of code: - and the question is what else I need to change on the older MKP chars so the sound plays instantly? They use the same - shared MKP Common1, Fatality.st and Pit.st files
Spoiler
; WIN [Statedef 180] type = S physics = N ctrl = 0 sprpriority = 0
[State 10, 2] type = selfstate trigger1 = wintime value = 175
Question
MKImpc7R
https://streamable.com/l5qum1
I've made my own finish/win code work in the MKP's common1.cns file when I make it at correct place it worked for all but now I decided to use the original code that comes with MKP 2.9, so that triggers match. A single win sound to play for specific stage will look like that:
[State 180, end music]
type = Playsnd
trigger1 = time = 0 && root,var(4) = 0 && prevstateno != 181
trigger1 = stagevar(info.name) = "pr1s0n"
value = f41,29
volumescale = 140
channel = 0
I have chars that I downloaded recent years and they are already v 1.0 and the sound plays instantly on Win with this code. Here in the video I show how the win sound is supposed to play when it works fine, for example the Green robot I took is already updated to 1.0
But old chars that did not use the shared file play it with some delay, as you can see there is some pause, no sound then the Wins is heard and the sound starts playing. This delay is what I want to fix
I found one first issue that prevented the Win from playing on Win state at all: Chars had in their main CNS a WIN code that had to be deleted , from
; WIN
[Statedef 180]
to Statedef 611 or maybe I need to keep the Intro too, but Win had to be deleted because they share it in the Common. The video shows both go through the same states. Again, the Purple is the one that has delay and I can't find all my converted chars from older MKP before they use the shared files have this delay. At least I fixed them to play music at all by deleting the Win state from their own CNS
So now they both use the shared Common.cns, here is a chunk of code: - and the question is what else I need to change on the older MKP chars so the sound plays instantly? They use the same - shared MKP Common1, Fatality.st and Pit.st files
; WIN
[Statedef 180]
type = S
physics = N
ctrl = 0
sprpriority = 0
[State 10, 2]
type = selfstate
trigger1 = wintime
value = 175
;Money Git
[State 2090, 1]
type = varset
trigger1 = enemy,var(25) > 0
trigger1 = AILevel = 0 && !ishometeam
trigger1 = fvar(11) > 0 || matchno > 1
var(25) = enemy,var(25)
persistent = 0
[State 0, no win count]
type = Explod
trigger1 = enemy,numexplod(11011) > 0
trigger1 = numexplod(11011) = 0
ID = 11011
anim = 888
removetime = -1
[State 10, 2]
type = assertspecial
trigger1 = 1
flag = nowalk
[state 180, 0]
type = stopsnd
trigger1 = time = 0 && prevstateno != 180
channel = 0
[State 10, 1]
type = assertspecial
trigger1 = var(17) = 1
flag = invisible
[state 180, 0]
type = velset
trigger1 = time = 0 && prevstateno != 180
x = 0
y = 0
[State -2, 2]
type = screenbound
trigger1 = var(26) != 0
trigger2 = numexplod(3333) > 0
value = 0
movecamera = 0,0
[State -2, 2]
type = screenbound
trigger1 = var(4) = 6
value = 1
movecamera = 0,0
[state 180, 0]
type = changeanim
trigger1 = time = 0 && anim != 888 && anim != [180,189]
value = 180
[state 180, 0]
type = posset
trigger1 = time = 0 && anim = 180
value = 180
[State 0, win];win screen
type = helper
triggerall = time = 0
trigger1 = numhelper(180) = 0 && partner,numhelper(180) = 0
ID = 180
stateno = 181
facing = facing
pos = 0,-90
ownpal = 1
[state 180, 0]
type = varset
trigger1 = time = 0 && prevstateno != 180
v = 11
value = 0
[State 0, wins]
type = varadd
triggerall = fvar(9) <= matchno+1
trigger1 = time = 1 && numexplod(187) = 0 && roundstate = 4
trigger1 = matchover
trigger1 = var(48) = 0
fvar(9) = 1
[state 180, 0]
type = removeexplod
trigger1 = time = 1 && numexplod(187) = 0 && roundstate = 4
trigger1 = matchover
ID = 11002
persistent = 0
[state 180, 0]
type = removeexplod
trigger1 = time = 1 && numexplod(187) = 0 && roundstate = 4
trigger1 = matchover
ID = 11003
persistent = 0
[State 0, no count]
type = Explod
trigger1 = time = 1 && numexplod(187) = 0 && roundstate = 4
ID = 187
anim = 888
removetime = -1
[state 180, 0]
type = ctrlset
trigger1 = time > 70
trigger2 = numpartner > 0 && partner,alive
trigger3 = var(48) = -1
value = 1
[Statedef 181]
velset = 0,0
anim = 888
0 answers to this question
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now