• Our software update is now concluded. You will need to reset your password to log in. In order to do this, you will have to click "Log in" in the top right corner and then "Forgot your password?".
  • Welcome to PokéCommunity! Register now and join one of the best fan communities on the 'net to talk Pokémon and more! We are not affiliated with The Pokémon Company or Nintendo.

Play a sound on the Title Screen?

IceGod64

In the Lost & Found bin!
624
Posts
15
Years
I've ben doing some work on the Title Screen in Pokémon Essentials for my project, and I have a question regarding using it.

How can one properly play a sound from the Title Screen? I'm trying to make it play using pbSEPlay and it's not playing anything no matter what SE I try to use.

I originally had a second another question, but I resolved it trying to reproduce the error and post it.

Edit: For reference, I'm using pbSEPlay in def closeSplash.
 
Last edited:

Maruno

Lead Dev of Pokémon Essentials
5,285
Posts
16
Years
Try this (in def openSplash):

Code:
    @pic.name="Graphics/Titles/"+@splash
    @pic.moveOpacity(15,0,255)
    [COLOR=Red]@pic.moveSE(15,"Audio/SE/yourSEfile")[/COLOR]
    @pic2.name="Graphics/Titles/start"
    @pic2.moveOpacity(15,0,255)
I recognised moveOpacity from the Poké Ball-throwing animation in battle, and I remembered that it also involved sound effects. A quick adaptation gave me the above code. I've not tested it, but I think it'll play the SE once as soon as the title screen has faded in.
 

Dying Light

Pegasus Knight
344
Posts
12
Years
Try this (in def openSplash):

Code:
    @pic.name="Graphics/Titles/"+@splash
    @pic.moveOpacity(15,0,255)
    [COLOR=Red]@pic.moveSE(15,"Audio/SE/yourSEfile")[/COLOR]
    @pic2.name="Graphics/Titles/start"
    @pic2.moveOpacity(15,0,255)
I recognised moveOpacity from the Poké Ball-throwing animation in battle, and I remembered that it also involved sound effects. A quick adaptation gave me the above code. I've not tested it, but I think it'll play the SE once as soon as the title screen has faded in.
I just tested it in Scene_Intro and it worked. All I did was change the code between line 47 and line 57. Then, I specified the SE to play. In my testing, I simply set a Pokémon cry. Now, when you press "C", it plays it.

EDIT: Yep, it works like a charm. IceGod64, Maruno's code is what you want. By itself, it plays a cry when you reach the titlescreen. With a little editing, you can set it so that it only plays when you press Enter or C.
 
Last edited:

Maruno

Lead Dev of Pokémon Essentials
5,285
Posts
16
Years
To have the SE play when closing the title screen, use this in def closeSplash:

Code:
    onCTrigger.clear
    onUpdate.clear
    [COLOR=Red]@pic.moveSE(0,"Audio/SE/yourSEfile")[/COLOR]
    @pic.moveOpacity(15,0,0)
    pictureWait
 
Back
Top