• Just a reminder that providing specifics on, sharing links to, or naming websites where ROMs can be accessed is against the rules. If your post has any of this information it will be removed.
  • Ever thought it'd be cool to have your art, writing, or challenge runs featured on PokéCommunity? Click here for info - we'd love to spotlight your work!
  • 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.

Playing animation for a Poké Ball opening?

  • 9
    Posts
    10
    Years
    • Seen May 8, 2024
    I'm trying to make a Gen 1 style game using Pokémon Essentials GS (really outdated, I know). I made an animation for a Poké Ball opening called "Common:PokeballAnim" and as far as I know it should work. However as I'm still pretty new to all of this I can't get the animation to run without an error.

    Code:
    def initialize(sprite,spritehash,pkmn,doublebattle)
    @disposed=false
    @PokemonBattlerSprite=sprite
    @pkmn=pkmn
    @PokemonBattlerSprite.visible=false
    @PokemonBattlerSprite.tone=Tone.new(248,248,248,248)
    @spritehash=spritehash
    if doublebattle
    @spritex=PokeBattle_SceneConstants::PLAYERBATTLERD1_X if pkmn.index==0
    @spritex=PokeBattle_SceneConstants::PLAYERBATTLERD2_X if pkmn.index==2
    else
    @spritex=PokeBattle_SceneConstants::PLAYERBATTLER_X
    end
    @spritey=0
    @endspritey=adjustBattleSpriteY(sprite,pkmn.species,pkmn.index)
    if doublebattle
    @spritey+=PokeBattle_SceneConstants::PLAYERBATTLERD1_Y if pkmn.index==0
    @spritey+=PokeBattle_SceneConstants::PLAYERBATTLERD2_Y if pkmn.index==2
    @endspritey+=PokeBattle_SceneConstants::PLAYERBATTLERD1_Y if pkmn.index==0
    @endspritey+=PokeBattle_SceneConstants::PLAYERBATTLERD2_Y if pkmn.index==2
    else
    @spritey+=PokeBattle_SceneConstants::PLAYERBATTLER_Y
    @endspritey+=PokeBattle_SceneConstants::PLAYERBATTLER_Y
    end
    #pbCommonAnimation("PokeballAnim",sprite,nil)
    @animdone=false
    @frame=0
    end

    When I run it here's the error I get:

    ---------------------------
    Pokemon Essentials RBY Test Project
    ---------------------------
    Exception: NoMethodError

    Message: undefined method `pbCommonAnimation' for #<PokeballPlayerSendOutAnimation:0x9161738>

    PokeBattle_ActualScene:1022:in `initialize'

    PokeBattle_ActualScene:2173:in `new'

    PokeBattle_ActualScene:2173:in `pbSendOut'

    PokeBattle_Battle:1215:in `pbSendOut'

    PokeBattle_Battle:2411:in `pbStartBattleCore'

    PokeBattle_Battle:2264:in `pbStartBattle'

    PokemonField:1019:in `pbWildBattle'

    PokemonField:1018:in `pbSceneStandby'

    PokemonField:1020:in `pbWildBattle'

    PokemonField:1017:in `pbBattleAnimation'



    This exception was logged in

    C:\Users\User\Saved Games/Pokemon Essentials RBY Test Project/errorlog.txt.

    Press Ctrl+C to copy this message to the clipboard.
    ---------------------------
    OK
    ---------------------------
     
    Back
    Top