• 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!
  • Which Pokémon Masters protagonist do you like most? Let us know by casting a vote in our Masters favorite protagonist poll here!
  • 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.

[Essentials Tutorial] Team Preview

FL

Pokémon Island Creator
  • 2,549
    Posts
    14
    Years
    • Seen today
    This tutorial explains how show the enemy's Poke Balls before taking the next Pokémon. Note that this isn't identical to original games. Tested on v13 and v17.2.

    In PokeBattle_ActualScene

    Change line:
    Code:
    @sprites["partybarplayer"].x-=16
    to
    Code:
    @sprites["partybarplayer"].x-=16 if @sprites["partybarplayer"]

    Change line:
    Code:
    @sprites["partybarplayer"].x=PokeBattle_SceneConstants::PLAYERPARTYBAR_X

    to

    Code:
    @sprites["partybarplayer"].x=PokeBattle_SceneConstants::PLAYERPARTYBAR_X if @sprites["partybarplayer"]

    Before line:

    Code:
    @sprites["enemy#{i}"].z=41

    Add:

    Code:
    @sprites["enemy#{i}"].y-=72 if @doublePreviewTop

    Change line:

    Code:
    @sprites["player#{i}"].x-=ballmovedist

    to

    Code:
    @sprites["player#{i}"].x-=ballmovedist if @sprites["partybarplayer"]

    Before line:

    Code:
    def partyAnimationUpdate

    Add:

    Code:
    def partyAnimationRestart(doublePreviewTop)
      @doublePreviewTop=doublePreviewTop
      yvalue=114
      yvalue-=72 if doublePreviewTop
      pbAddSprite("partybarfoe",-400,yvalue,"Graphics/Pictures/battleLineup",@viewport)
      @sprites["partybarfoe"].visible=true
      @partyAnimPhase=0
    end 
    
    def partyAnimationFade
      frame=0
      while(frame<24)
        if @partyAnimPhase!=3
          pbGraphicsUpdate
          next
        end
        frame+=1
        @sprites["partybarfoe"].x+=8
        @sprites["partybarfoe"].opacity-=12
        for i in 0...6
          partyI = i
          @sprites["enemy#{partyI}"].opacity-=12
          @sprites["enemy#{partyI}"].x+=8 if frame >= i*4
        end
        pbGraphicsUpdate
      end
      for i in 0...6
        partyI = i
        pbDisposeSprite(@sprites,"player#{partyI}")
      end
      pbDisposeSprite(@sprites,"partybarfoe")
    end

    In PokeBattle_Battle

    After line:

    Code:
    opponent=pbGetOwner(index)

    Add line

    Code:
    @scene.partyAnimationRestart(index==1 && @doublebattle) if index != 2

    Change:

    Code:
    end
    pbRecallAndReplace(index,newenemy,newenemyname,false,false)

    to

    Code:
    else
      # You can change the time delay for double/Set Option here
      timedelay=64 # Set Option
      timedelay=96 if @doublebattle
      for i in 0...timedelay
        @scene.pbGraphicsUpdate
      end
    end
    @scene.partyAnimationFade if index!=2
    pbRecallAndReplace(index,newenemy,newenemyname,false,false)
     

    Attachments

    • [PokeCommunity.com] Team Preview
      screen.png
      7 KB · Views: 367
    Last edited:
    Basic and essential for people that want to make a game like official one (like me lol). Thanks for share!
     
    Trying the script, but line @scene.partyAnimationRestart(index==1 && @doublebattle) if index != 2 throws me syntax error. I'm using v17.2.
     
    Tutorial fixed! For some reason, when I copied/pasted, there were two typos on code.

    Great! Also line "while(frame<24)" seems to cause syntax error, maybe because of the same problem
     
    I've followed the tutorial step by step, but I got an error:

    Code:
    ---------------------------
    [Pokémon Essentials version 17.2]
    
    Exception: NoMethodError
    
    Message: undefined method `x' for nil:NilClass
    
    PokeBattle_Scene:1805:in `partyAnimationUpdate'
    
    PokeBattle_Scene:1426:in `pbGraphicsUpdate'
    
    PokeBattle_Battle:1439:in `pbSwitch'
    
    PokeBattle_Battle:1438:in `each'
    
    PokeBattle_Battle:1438:in `pbSwitch'
    
    PokeBattle_Battle:1405:in `each'
    
    PokeBattle_Battle:1405:in `pbSwitch'
    
    PokeBattle_Battle:4310:in `__clauses__pbEndOfRoundPhase'
    
    PokeBattle_Clauses:42:in `pbEndOfRoundPhase'
    
    PokeBattle_Battle:2778:in `pbStartBattleCore'
    ---------------------------

    The line which the error comes from looks like this, as in the tutorial:

    Code:
    @sprites["partybarplayer"].x-=16 if @sprites
     
    I've followed the tutorial step by step, but I got an error

    The line which the error comes from looks like this, as in the tutorial:

    Code:
    @sprites["partybarplayer"].x-=16 if @sprites
    The correct line was:

    Code:
    @sprites["partybarplayer"].x-=16 if @sprites["partybarplayer"]

    When the thread broke, I incorrectly fixed this line.

    Now is correctly fixed.
     
    Back
    Top