Logo

(SM5 Theme Help) How to keep sound effect playing from one screen to another

Register Log In Back To Forums

Post #1 · Posted at 2021-01-21 11:10:59pm 3.2 years ago

Offline NicholasNRG
NicholasNRG Avatar Member
635 Posts
Puerto Rico
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

Offline ZTS
ZTS Avatar Member
139 Posts
Not Set
Reg. 2015-01-13

"But enough talk! Have at you!"
Use SOUNDTonguelayOnce() instead of Def.Sound.
Get Rave It Out! https://sites.google.com/view/riodevs/home
Want your theme made? I take commissions, PM for details.

Post #3 · Posted at 2021-01-24 03:00:59am 3.2 years ago

Offline NicholasNRG
NicholasNRG Avatar Member
635 Posts
Puerto Rico
Reg. 2014-06-21

"Just Play Along"
Quote: ZTS
Use SOUNDTonguelayOnce() 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
SOUNDTonguelayAnnouncer("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

Offline ZTS
ZTS Avatar Member
139 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")
Get Rave It Out! https://sites.google.com/view/riodevs/home
Want your theme made? I take commissions, PM for details.

Post #5 · Posted at 2021-01-26 03:13:16am 3.2 years ago

Offline VR0
VR0 Avatar Member
969 Posts
Chile
Reg. 2012-03-20

"ムーン ゴーシュス メヂィデーション"
Quote: ZTS
Use SOUND:PlayOnce() instead of Def.Sound.
No emoticons allowed in codes.
AC Score Tracker: DDR EXTREME // SN2 (JP)
My username in these games:
DDR(1st)-EXTREME: VRC
StepMania 3.9+ REDUX: VRC
DDR Supernova onwards / IIDX ID: VR0

Post #6 · Posted at 2021-01-26 06:24:11am 3.2 years ago

Offline ZTS
ZTS Avatar Member
139 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 SOUNDTonguelayOnce() instead of Def.Sound.
No emoticons allowed in codes.
I forgot to untick enable emotions. I fixed it now.
Get Rave It Out! https://sites.google.com/view/riodevs/home
Want your theme made? I take commissions, PM for details.
Register Log In Back To Forums

0 User(s) Viewing This Thread (Past 15 Minutes)

©2006-2024 Zenius -I- vanisher.com -5th style- IIPrivacy Policy
Web Server: 4% · Database: 4% · Server Time: 2024-04-19 18:11:36
This page took 0.006 seconds to execute.
Theme: starlight · Language: englishuk
Reset Theme & Language