• 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!
  • Our weekly protagonist poll is now up! Vote for your favorite Trading Card Game 2 protagonist in the poll by clicking 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.

Direction Messageboards

  • 971
    Posts
    8
    Years
    • Age 22
    • Seen Nov 28, 2022
    A super tiny script for direction message-board pop-ups. The graphics are supposed to be changed (as they're quite bad), but here's what it could look like:
    [PokeCommunity.com] Direction Messageboards

    The graphics are 100% changeable and should be dynamic with any screen size.

    Put the following sprites in the respective folders.

    That's all. You can paste it in a new script section or anywhere else.
    Code:
    def pbDirBoard(text, dir = nil, speed = 16, windowskin = "directionBoard")
      vp = Viewport.new(0, 0, Graphics.width, Graphics.height)
      vp.z = 99999
      sp = {}
      sp[:box] = Sprite.new(vp)
      sp[:box].bitmap = Bitmap.new("Graphics/Windowskins/#{windowskin}")
      sp[:box].y = Graphics.height
      sp[:bmp] = Sprite.new(vp)
      sp[:bmp].bitmap = Bitmap.new(Graphics.width, Graphics.height)
      sp[:bmp].z = 1
      pbSetSystemFont(sp[:bmp].bitmap)
      drawTextEx(sp[:bmp].bitmap,32,Graphics.height - sp[:box].bitmap.height / 2 - 16,
    				Graphics.width,2,text,Color.new(64,64,64),Color.new(172,172,172))
      sp[:bmp].y += sp[:box].bitmap.height
      sp[:dir] = Sprite.new(vp)
      begin
    	sp[:dir].bitmap = Bitmap.new("Graphics/Pictures/board#{dir}")
    	sp[:dir].ox = sp[:dir].bitmap.width
    	sp[:dir].oy = sp[:dir].bitmap.height / 2
    	sp[:dir].y = Graphics.height - sp[:box].bitmap.height / 2
    	sp[:dir].x = Graphics.width - 48
      rescue; end
      sp[:dir].y += sp[:box].bitmap.height
      speed.times do # Intro animation
    	Graphics.update
    	$scene.updateSpritesets
    	sp[:box].y -= sp[:box].bitmap.height / speed
    	sp[:bmp].y -= sp[:box].bitmap.height / speed
    	sp[:dir].y -= sp[:box].bitmap.height / speed
      end
      loop do # Update input
    	Graphics.update
    	Input.update
    	$scene.updateSpritesets
    	break if Input.trigger?(Input::B)	|| Input.trigger?(Input::C) ||
    			 Input.trigger?(Input::UP)   || Input.trigger?(Input::DOWN) ||
    			 Input.trigger?(Input::LEFT) || Input.trigger?(Input::RIGHT)
      end
      speed.times do # Outro animation
    	Graphics.update
    	$scene.updateSpritesets
    	sp[:box].y += sp[:box].bitmap.height / speed
    	sp[:bmp].y += sp[:box].bitmap.height / speed
    	sp[:dir].y += sp[:box].bitmap.height / speed
      end
      pbDisposeSpriteHash(sp)
      vp.dispose
      pbWait(1)
    end

    Here are a few examples:
    Spoiler:


    Some documentation
    Spoiler:
     
    Last edited:
    Back
    Top