• Our software update is now concluded. You will need to reset your password to log in. In order to do this, you will have to click "Log in" in the top right corner and then "Forgot your password?".
  • 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
7
Years
    • Age 21
    • 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:
    Sample.png

    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