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

[Eventing Question] Calling a Pokémon cry on events.

NanaelJustice

AbsoluteXandy
  • 64
    Posts
    6
    Years
    After some point, Pokémon Essentials changed the folder where the Pokémon Cries where stored, so you can't just call it normally by event anymore. What I'm been doing was copying the cries I needed to the "SE" folder, but that just seems like a dumb solution.

    There is a specific script call to use them directly from the "Cries" folder in a normal event?
     
    Make an event.
    Add the Play SE Option and select the cry according to the National Dex Number. Ofcourse #Not Important's post is better as it needs the script command and Pokenon's cry name.
     
    pbPlayCrySE(:POKEMON)
    Tried, but it gave me a crash.

    Spoiler:

    Make an event.
    Add the Play SE Option and select the cry according to the National Dex Number. Ofcourse #Not Important's post is better as it needs the script command and Pokenon's cry name.
    They are not in the "SE" folder anymore, so you can't use them by the Play SE option.
     
    You'll want pbPlayCrySpecies(:MEW) to play the cry. Of course, :MEW is changed to the internal name of your desired pokemon.
    Strange... it's seems like it is something through those lines, but I still getting a crash.
    Spoiler:


    Looking at some scripts I found out that Scene_Intro use this to play random cries:
    Code:
    cry=pbCryFile(1+rand(PBSpecies.maxValue))
        pbSEPlay(cry,80,100) if cry
    Also PScreen_Summary uses pbPlayCry(@pokemon), but I'm not sure how to transfer it to a script call that doesn't crash the game. The game won't crash if I try something like pbPlayCry(@MEW), but there will be no cry playing either.
     
    Last edited:
    You haven't yet mentioned which version of Essentials you're using.
     
    The game won't crash if I try something like pbPlayCry(@MEW), but there will be no cry playing either.

    Well first off, not sure why you got the crash, though you may be on an earlier version of essentials. That's beside the point though.

    You can use pbPlayCry(getID(PBSpecies,:MEW)) instead. We need the getID to convert the species symbol into it's number instead.

    @MEW doesn't crash because the @ makes it an instance variable name, and instance variables are automatically filled with nil if you create one without giving it a value. The script bails if the given pokemon is nil.
     
    You haven't yet mentioned which version of Essentials you're using.
    There is a way to know exactly which version you are in besides by the folder's name? Because all the trouble it could be to find it on the internet I just keep one version I have here in a pendrive so I can copy it and use it.

    Noticeable thing is that the Pokémon cries are in a separate folder inside the "SE" folder, in that version the evolutions do not use the old spinning animation and also the old editor is not included anymore.

    Well first off, not sure why you got the crash, though you may be on an earlier version of essentials. That's beside the point though.

    You can use pbPlayCry(getID(PBSpecies,:MEW)) instead. We need the getID to convert the species symbol into it's number instead.

    @MEW doesn't crash because the @ makes it an instance variable name, and instance variables are automatically filled with nil if you create one without giving it a value. The script bails if the given pokemon is nil.
    pbPlayCry(getID(PBSpecies,:MEW)) worked perfectly, thanks!

    Also, thank you again for all the explanation, I know little to nothing about scripts, all that can come handy sometime.
     
    There is a way to know exactly which version you are in besides by the folder's name? Because all the trouble it could be to find it on the internet I just keep one version I have here in a pendrive so I can copy it and use it.

    Noticeable thing is that the Pokémon cries are in a separate folder inside the "SE" folder, in that version the evolutions do not use the old spinning animation and also the old editor is not included anymore.

    Well, only v17 (and patches) reports its version number, most obviously in the crash message, though the top of the Settings script section in the Script Editor also prominently says v17.

    Earlier versions of Essentials do not have this, so you can only guess the version based off stuff that changed between versions. v16 moved the bridge variable from $PokemonMap to $PokemonGlobal, for example. (That's a thing that breaks really old scripts.) And v17 renamed a bunch of classes from v16. (Equally, if not more so break-y.)
    It's possible you make not have a clean download too, as there are derivatives of the Essentials engine, which all have their own idiosyncrasies. I've once seen an Essentials derivative that on the surface appeared to v16, but had elements of both v17 and v15. To say it was a nightmare to deal with is an understatement.

    I've gotten off topic now. If you don't have the old editor and the cries were moved, you're "supposed" to be on v17, but v17 is has pbPlayCrySpecies. Your screenshot also cuts off the usual header stating the version number.

    At the very least, the original issue is solved.
     
    Back
    Top