• 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.

[Custom Feature Question] Changing the random cry at the intro

11
Posts
10
Years
    • Seen Nov 6, 2020
    Hi,

    I'm struggling in my game project about the random cry at the beginning (at the splash screen). I just want to change it to a specific cry but it's just not working (no sound at all) when I tried a solution I found (change cry to '001Cry' with the number being the pokedex position of the pokemon).

    Can someone help me about it? There is not so much answer about it (at least, I didn't found it yet).

    Thanks in advance!
     

    Ego13

    hollow_ego
    311
    Posts
    6
    Years
  • Can you show that part of the code where you changed the cry? And are you using any special splash screens instead of the Essentials one?
     
    11
    Posts
    10
    Years
    • Seen Nov 6, 2020
    First of all, thanks for this quick answer!

    Yes I'm using my own custom splash screen.

    So I change the cry in the Scene_Intro Script file 2 times :

    here:
    # Play random cry
    cry=pbCryFile(1+rand(PBSpecies.maxValue))
    pbSEPlay('001Cry',100,100) if cry

    and here:
    # Play random cry
    cry=pbCryFile(1+rand(PBSpecies.maxValue))
    pbSEPlay('001Cry',100,100) if cry

    This is what I have for now. I suspect the problem coming from the first line of each since it said rand but I don't know.
     

    Aldo

    Survivalist
    1,160
    Posts
    5
    Years
    • Seen May 5, 2024
    That's right, the first line is what chooses a random species cry. Here's something I did that worked for me.
    This is how it originally was:
    Code:
        # Play random cry
        cry=pbCryFile(1+rand(PBSpecies.maxValue))
        pbSEPlay(cry,80,100) if cry

    Just change [S-HIGHLIGHT]1+rand(PBSpecies.maxValue)[/S-HIGHLIGHT] to the number of the species' cry you want. Like this:
    Code:
        # Play random cry
        cry=pbCryFile(005)
        pbSEPlay(cry,80,100) if cry
     
    11
    Posts
    10
    Years
    • Seen Nov 6, 2020
    That's right, the first line is what chooses a random species cry. Here's something I did that worked for me.
    This is how it originally was:
    Code:
        # Play random cry
        cry=pbCryFile(1+rand(PBSpecies.maxValue))
        pbSEPlay(cry,80,100) if cry

    Just change [S-HIGHLIGHT]1+rand(PBSpecies.maxValue)[/S-HIGHLIGHT] to the number of the species' cry you want. Like this:
    Code:
        # Play random cry
        cry=pbCryFile(005)
        pbSEPlay(cry,80,100) if cry

    Yeah! it worked like a charm, thanks to you!
    I'm feeling kind of stupid right now with this pretty obvious answer ;D

    Thanks a lot!
     
    11
    Posts
    10
    Years
    • Seen Nov 6, 2020
    Yeah! It worked like a charm, thanks to you!
    I'm kind of feeling silly because the answer is pretty obvious when you have it ;)

    Anyways, thanks a lot for your help!
     
    37
    Posts
    5
    Years
    • Seen Jul 25, 2020
    That's right, the first line is what chooses a random species cry. Here's something I did that worked for me.
    This is how it originally was:
    Code:
        # Play random cry
        cry=pbCryFile(1+rand(PBSpecies.maxValue))
        pbSEPlay(cry,80,100) if cry

    Just change [S-HIGHLIGHT]1+rand(PBSpecies.maxValue)[/S-HIGHLIGHT] to the number of the species' cry you want. Like this:
    Code:
        # Play random cry
        cry=pbCryFile(005)
        pbSEPlay(cry,80,100) if cry

    I'm having his same problem, my script should be

    def closeSplash(scene,args)
    onCTrigger.clear
    onUpdate.clear
    # Play random cry
    cry=pbResolveAudioSE(pbCryFile(151))
    pbSEPlay(cry,80,100) if cry
    # Fade out
    @pic.moveOpacity(15,0,0)
    @pic2.moveOpacity(15,0,0)
    pbBGMStop(1.0)
    pictureWait
    scene.dispose # Close the scene
    sscene=PokemonLoadScene.new
    sscreen=PokemonLoad.new(sscene)
    sscreen.pbStartLoadScreen
    end

    def closeSplashDelete(scene,args)
    onCTrigger.clear
    onUpdate.clear
    # Play random cry
    cry=pbResolveAudioSE(pbCryFile(151))
    pbSEPlay(cry,100,100) if cry
    # Fade out
    @pic.moveOpacity(15,0,0)
    @pic2.moveOpacity(15,0,0)
    pbBGMStop(1.0)
    pictureWait
    scene.dispose # Close the scene
    sscene=PokemonLoadScene.new
    sscreen=PokemonLoad.new(sscene)
    sscreen.pbStartDeleteScreen
    end

    but the game keeps playing an other cry
     

    Ego13

    hollow_ego
    311
    Posts
    6
    Years
  • I'm having his same problem, my script should be

    def closeSplash(scene,args)
    onCTrigger.clear
    onUpdate.clear
    # Play random cry
    cry=pbResolveAudioSE(pbCryFile(151))
    pbSEPlay(cry,80,100) if cry
    # Fade out
    @pic.moveOpacity(15,0,0)
    @pic2.moveOpacity(15,0,0)
    pbBGMStop(1.0)
    pictureWait
    scene.dispose # Close the scene
    sscene=PokemonLoadScene.new
    sscreen=PokemonLoad.new(sscene)
    sscreen.pbStartLoadScreen
    end

    def closeSplashDelete(scene,args)
    onCTrigger.clear
    onUpdate.clear
    # Play random cry
    cry=pbResolveAudioSE(pbCryFile(151))
    pbSEPlay(cry,100,100) if cry
    # Fade out
    @pic.moveOpacity(15,0,0)
    @pic2.moveOpacity(15,0,0)
    pbBGMStop(1.0)
    pictureWait
    scene.dispose # Close the scene
    sscene=PokemonLoadScene.new
    sscreen=PokemonLoad.new(sscene)
    sscreen.pbStartDeleteScreen
    end

    but the game keeps playing an other cry

    try changing
    Code:
     cry=pbResolveAudioSE(pbCryFile(151))
    to
    Code:
     cry=pbCryFile(151)

    Also if you post code please put it between code tags so it's easier to read
     
    37
    Posts
    5
    Years
    • Seen Jul 25, 2020
    try changing
    Code:
     cry=pbResolveAudioSE(pbCryFile(151))
    to
    Code:
     cry=pbCryFile(151)

    Also if you post code please put it between code tags so it's easier to read

    I'm so dumb, i just found out that the script running in the intro was an other and not Scene_Intro, now it works thank you
     
    Back
    Top