Post #1 · Posted at 2021-01-21 11:10:59pm 3.2 years ago
NicholasNRG | |
---|---|
Member | |
635 Posts | |
Reg. 2014-06-21 | |
"Just Play Along" |
I have this StepMania 5 theme where a sound effect plays in the ScreenStageInformation screen, but once it transitions to ScreenGameplay, the sound effect is abruptly muted and doesn't get to finish playing. Is there anything I could do to allow the sound effect to keep playing even after the transition? Or at least make ScreenStageInformation take a bit longer to change to ScreenGameplay, just enough that the sound effect gets to finish playing.
Post #2 · Posted at 2021-01-22 04:00:35am 3.2 years ago
ZTS | |
---|---|
Member | |
140 Posts | |
Not Set | |
Reg. 2015-01-13 | |
"But enough talk! Have at you!" |
Use SOUNDlayOnce() instead of Def.Sound.
Post #3 · Posted at 2021-01-24 03:00:59am 3.2 years ago
NicholasNRG | |
---|---|
Member | |
635 Posts | |
Reg. 2014-06-21 | |
"Just Play Along" |
Quote: ZTS
Use SOUNDlayOnce() instead of Def.Sound.
Here's what the theme is doing:
if GAMESTATE:IsEventMode() or (GAMESTATE:GetPlayMode()=='PlayMode_Oni') or (GAMESTATE:GetPlayMode()=='PlayMode_Nonstop') then
SOUNDlayAnnouncer("stage")
t[#t+1] = Def.ActorFrame {
LoadActor("event") .. {
OnCommand=cmd(queuecommand,"Play");
PlayCommand=cmd(play);
};
};
SOUNDlayAnnouncer("stage")
t[#t+1] = Def.ActorFrame {
LoadActor("event") .. {
OnCommand=cmd(queuecommand,"Play");
PlayCommand=cmd(play);
};
};
"event" probably refers to the event.mp3 sound effect that it's playing, I'm not sure what to do here
Post #4 · Posted at 2021-01-24 03:58:57am 3.2 years ago
ZTS | |
---|---|
Member | |
140 Posts | |
Not Set | |
Reg. 2015-01-13 | |
"But enough talk! Have at you!" |
Last updated: 2021-01-26 06:24am
You don't need to load the event actor since it will be handled by SOUNDMAN, but you need to specify the exact path to the sound. In this example I'm loading it from the Sounds folder since its easier that way.
Def.ActorFrame{
OnCommand=function(self)
SOUND:PlayOnce(THEME:GetPathS("","event"))
end;
}
Alternatively if you don't want to move the file you can put in the path to the folder, ex. If its in ScreenStageInformation overlay folder you would do THEME:GetPathB("ScreenStageInformation","overlay/event")
Def.ActorFrame{
OnCommand=function(self)
SOUND:PlayOnce(THEME:GetPathS("","event"))
end;
}
Alternatively if you don't want to move the file you can put in the path to the folder, ex. If its in ScreenStageInformation overlay folder you would do THEME:GetPathB("ScreenStageInformation","overlay/event")
Post #5 · Posted at 2021-01-26 03:13:16am 3.2 years ago
VR0 | |
---|---|
Member | |
969 Posts | |
Reg. 2012-03-20 | |
"ムーン ゴーシュス メヂィデーション" |
Quote: ZTS
Use SOUND:PlayOnce() instead of Def.Sound.
No emoticons allowed in codes.Post #6 · Posted at 2021-01-26 06:24:11am 3.2 years ago
ZTS | |
---|---|
Member | |
140 Posts | |
Not Set | |
Reg. 2015-01-13 | |
"But enough talk! Have at you!" |
Last updated: 2021-01-26 06:25am
Quote: VR0
Quote: ZTS
Use SOUNDlayOnce() instead of Def.Sound.
No emoticons allowed in codes.