VX Picture below Characters script by Woratana

posted on 24 Feb 2009 08:27 by boxsuke  in Resources, ScriptsVX, WoraScripts
* สคริปต์นี้จะแสดงรูปใต้ตัวละครครับ แต่อยู่สูงกว่าไทล์แมพ เอาไว้ตอนทำเอฟเฟ็กต์อะไรต่าง ๆ บนแมพฮะ (เช่น Fadein Fadeout โดยยังแสดงตัวละครให้เห็น)
 
Picture below Characters
* Show pictures under characters on map but above map tiles
Version 1.0
by Woratana
Release Date: 24/02/2009


Introduction
There was a script request from long time ago requesting this script.
But I have no idea how to do it at that time.

After I learned more about viewport,
I know how to it and think that this could be useful for many people. ^^
It will help to make some effects on the screen a lot easier.

Enjoy~^^


Features
Version 1.0
- Unlimited numbers of picture under characters


Screenshots



Script
I decided to keep script on my blog. So it will be easier to update the script. ^^
#===============================================================
# ● [VX] ◦ Pictures under Characters ◦ □
# * Show pictures under characters on map but above map tiles *
#--------------------------------------------------------------
# ◦ by Woratana [woratana@hotmail.com]
# ◦ Thaiware RPG Maker Community
# ◦ Released on: 22/02/2009
# ◦ Version: 1.0
#--------------------------------------------------------------
# ◦ Update:
#--------------------------------------------------------------
# □ Version 1.0 (22/02/2009)
# - Unlimited numbers of picture under characters
#
#--------------------------------------------------------------
# ◦ Compatibility:
#--------------------------------------------------------------
# □ This script will rewrite 0 method(s):
#
#
# □ This script will alias 2 method(s):
#     Spriteset_Map.create_pictures
#     Sprite_Picture.update
#
# □ This script should work with most scripts
#
#--------------------------------------------------------------
# ◦ Installation:
#--------------------------------------------------------------
# 1) This script should be placed JUST AFTER ▼ Materials.
#
# □ Like this:
# ▼ Materials
# *Pictures under Characters
# ...
# ...
# ▼ Main Process
# Main
#
# 2) Setup this script in Setup Part below.
#
#--------------------------------------------------------------
# ◦ How to use:
#--------------------------------------------------------------
# □ Place this script and setup in the setup part.
#
#=================================================================

class Spriteset_Map

  #=================================================================
  # ++ Setup Part
  #-----------------------------------------------------------------
  FIRST_PICBELOW_ID = 15 # First ID of picture that will show below characters
  LAST_PICBELOW_ID = 20 # Last ID of picture that will show below characters

  #   For example, if you set FIRST to 10 and LAST to 15, picture ID 10-15
  # will show below characters on map.
  #=================================================================

  alias wora_picbelow_sprsetmap_crepic create_pictures

  #--------------------------------------------------------------------------
  # * Create Picture Sprite
  #--------------------------------------------------------------------------
  def create_pictures(*args)
    wora_picbelow_sprsetmap_crepic(*args)
    for pic_id in FIRST_PICBELOW_ID..LAST_PICBELOW_ID
      @picture_sprites[pic_id - 1].dispose
      # Create picture below player in viewport1, so it can show just below player
      @picture_sprites[pic_id - 1] = Sprite_Picture.new(@viewport1,
    $game_map.screen.pictures[pic_id])
    end
  end
end

class Sprite_Picture < Sprite
  alias wora_picbelow_sprpic_upd update

  #--------------------------------------------------------------------------
  # * Frame Update
  #--------------------------------------------------------------------------
  def update(*args)
    wora_picbelow_sprpic_upd(*args)
    self.z = $game_player.screen_z - 1 if @picture.number >=
  Spriteset_Map::FIRST_PICBELOW_ID and @picture.number <= Spriteset_Map::LAST_PICBELOW_ID
  end
end
 
 
Instruction
- Setup script in the SETUP part
- The complete instruction is included in the script


Author's Notes
Free for use in your work if credit is included.
If you want to post it on any forum, please link to this topic.


Bug Report?
Please give me these informations:
QUOTE
- What is it says in error window?
- When is it get error? (Right after run game, when you choose something, etc.)
- What have you changed in setting part?
- Do you have any other scripts running in your game that may crash with this script?

edit @ 24 Feb 2009 08:30:52 by [+Boxsuke+]

Comment



smilebig smileopen-mounthed smileconfused smilesad smileangry smiletonguequestionembarrassedsurprised smilewinkdouble winkcry

Tweet

Does this mean that I could make a map in PhotoShop or some other similar program, save it in the picture folder, and use this script to make it look like the character is on that map? I think this would be very useful if it worked like that.

I'm going to be busy the next couple of days, but I would love it if you added me MSN messenger (if you have one). This way we could chat. I've been looking at your other scripts as well. ^-^ You're very talented and have lots of good ideas.

Oralom@hotmail.com (MSN Messenger)big smile

#1 By Oralom (68.203.88.181) on 2009-03-23 01:21