FANDOM


Vs Sequence (Script By Luka S.J)
This tutorial is deprecated. It is no longer relevant to the latest version of Pokémon Essentials.

This tutorial was written by Venom12 (scripts by Luka S.J). Please give credit.

Click here for more tutorials!


Tutorial for vs sequence.

Here are example graphics. All graphics put in folder Game/Graphics/VS: [1]

So for graphics, use, like you have a trainer named Brock name graphics. "Face_Brock" and "Bar_Brock". And then launch a switch which you use for Vs. sequence for a sequence before Gym Leader or rival, or Elite Four.

So first add a new setting for game_switch. Go to Script Settings and add a line

VS_BAR_SWITCH=Number of switch

then go to script PokemonTrainers. Search for def pbTrainerBattle and before if $Trainer.pokemonCount==0 add:

$trainername=trainername

Now go to PokemonField script and after that script

    elsif Bitmap.method_defined?(:radial_blur) && rand(15)==0
      viewport.color=Color.new(0,0,0,255)
      sprite = Sprite.new
      bitmap=Graphics.snap_to_bitmap
      bm=bitmap.clone
      sprite.z=99999
      sprite.bitmap = bm
      for i in 0..15
        bm.radial_blur(i,2)
        sprite.opacity-=15
        2.times do
          Graphics.update
        end
      end
      bitmap.dispose
      bm.dispose
      sprite.dispose

add this script:

 elsif $game_switches[VS_BAR_SWITCH]==true
   count=0
   value=2
   value2=2
   dark=Sprite.new(@viewport)
   dark.bitmap=BitmapCache.load_bitmap("Graphics/Pictures/Darkbg.png")
   dark.opacity=180
   dark.z = 99999
   light2=Sprite.new(@viewport)
   light2.bitmap=BitmapCache.load_bitmap("Graphics/Pictures/Lightbg2.png")
   light2.z = 9999999
   light2.visible=false
   bar1=Sprite.new(@viewport)
   bar1.bitmap=BitmapCache.load_bitmap("Graphics/VS/bar_"+$trainername+".png")
   bar1.y=126
   bar1.x=512
   bar1.z=100000
   bar2=Sprite.new(@viewport)
   bar2.bitmap=BitmapCache.load_bitmap("Graphics/VS/bar_"+$trainername+".png")
   bar2.y=126
   bar2.x=1024
   bar2.z=100000
   face=Sprite.new(@viewport)
   face.bitmap=BitmapCache.load_bitmap("Graphics/VS/face_"+$trainername+".png")
   face.x=512
   face.y=126
   face.z=100001
   face.color=Color.new(0,0,0,255)
   vs=Sprite.new(@viewport)
   vs.bitmap=BitmapCache.load_bitmap("Graphics/VS/VS.png")
   vs.x=100
   vs.y=138
   vs.z=100002
   vs.visible=false
   sprites = {}
   sprites["overlay"]=SpriteWrapper.new(@viewport)
   sprites["overlay"].z = 100003
   sprites["overlay"].bitmap=Bitmap.new(Graphics.width,Graphics.height)
   overlay = sprites["overlay"].bitmap
   pbSetSystemFont(sprites["overlay"].bitmap)
   overlay=sprites["overlay"].bitmap
   overlay.clear
   baseColor=Color.new(248,248,248)
   shadowColor=Color.new(104,88,112)
   140.times do
     if count>=20
       if face.x>296
         face.x-=36
       end
     end
     if count==50
       light2.visible=true
     end
     if count>=51 && count<=55
       light2.opacity-=51
     end
     if count==51
       textPositions=[
          [_INTL("{1}",$trainername),232,264,false,baseColor,shadowColor],
       ]  
       pbDrawTextPositions(overlay,textPositions)
       face.color=Color.new(0,0,0,0)
       vs.visible=true
     end
     if bar1.x<=-512
       bar1.x=512
     end
     if bar2.x<=-512
       bar2.x=512
     end
     if count>=51
       if vs.y==136
         value=2
       end
       if vs.y==140
         value=-2
       end
       if vs.x==98
         value2=2
       end
       if vs.x==102
         value2=-2
       end
       vs.y+=value
       vs.x+=value2
     end
     bar1.x-=64
     bar2.x-=64
     count+=1
     pbWait(1)
   end
   transitions=["zoomin"]
   rnd=rand(transitions.length)
   Graphics.freeze
   viewport.color=Color.new(0,0,0,255)
   dark.dispose
   light2.dispose
   bar1.dispose
   bar2.dispose
   face.dispose
   vs.dispose
   overlay.dispose
   Graphics.transition(10,
   sprintf("Graphics/Transitions/%s",transitions[rnd]))

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.