FANDOM


Adding Team Preview between pokémon switches
This tutorial was written by -FL-. Please give credit.

This tutorial is related to the following pages:

Click here for more tutorials!


Teampreview

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. Updated and tested with Essentials V16.

In PokeBattle_ActualScene

Change line

@sprites["partybarplayer"].x-=16

to

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

Change line:

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

to

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

Before line:

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

Add:

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

Change line:

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

to

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

Before line:

def partyAnimationUpdate

Add:

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:

opponent=pbGetOwner(index)

Add line

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

Change:

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

to

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)

Ad blocker interference detected!


Wikia is a free-to-use site that makes money from advertising. We have a modified experience for viewers using ad blockers

Wikia is not accessible if you’ve made further modifications. Remove the custom ad blocker rule(s) and the page will load as expected.