RMRK is retiring.
Registration is disabled. The site will remain online, but eventually become a read-only archive. More information.

RMRK.net has nothing to do with Blockchains, Cryptocurrency or NFTs. We have been around since the early 2000s, but there is a new group using the RMRK name that deals with those things. We have nothing to do with them.
NFTs are a scam, and if somebody is trying to persuade you to buy or invest in crypto/blockchain/NFT content, please turn them down and save your money. See this video for more information.
[Solved] Character sprite above picture?

0 Members and 1 Guest are viewing this topic.

**
Rep:
Level 30
GIAW 14: 1st Place (Hard Mode)
In my action game, the player is able to teleport around the map by activating a skill. To do this, I use a common event that pauses all other events and set a time limit for the character to move before everything is reactivated. Currently, it works and acts almost like a time stop effect. However, I would like to enhance this by having the common event take a screenshot of what the screen looks like just before pausing everything, using that screenshot as a still picture above the regular map, and then having a ghostly player sprite walk above the picture before returning everything to normal when the time is up. It looks much better this way and iterates that it's teleporting rather than time stopping. I can easily set it so that the background picture is used like a normal picture would be, but for some reason I'm having difficulty in setting the player sprite to appear ABOVE the picture instead of under it.

I know that the screen_z bit in the Sprite_Character script is probably what I need to adjust, but I can't seem to get it to work properly no matter what I try. Am I missing something, or is there an easier way to set the player's priority?
« Last Edit: July 17, 2015, 09:52:12 PM by TopsyKrett »

*
&&&&&&&&&&&&&&&&&&&&&&&&&&&&&
Rep:
Level 96
&&&&&&&&&&&&&&&&&&&&&&&&&&&
GIAW 14: 2nd Place (Hard Mode)2013 Biggest Drama Whore2013 Zero to HeroParticipant - GIAW 11Secret Santa 2013 ParticipantFor taking arms in the name of your breakfast.
This may help - http://www.rpgmakervxace.net/topic/30760-pictures-beneath-characters/

Also.
Here's what I'm using. I would link to where I got it, but I can't seem to find it. :(

Code: [Select]
=begin

 Picture Below Characters Ace
 by Woratana
 Port by PK8
 Created: 2/22/2009
 Ported: 4/25/2012
 Modified: 4/25/2012
 ──────────────────────────────────────────────────────────────────────────────
 ■ Table of Contents
   ○ Introduction & Description                    - Line 17-18
   ○ Features                                      - Line 20-22
   ○ Methods Aliased                               - Line 24-26
   ○ Thanks                                        - Line 28-29
   ○ Changelog                                     - Line 31-33
 ──────────────────────────────────────────────────────────────────────────────
 ■ Introduction & Description
   Show pictures above the tiles but underneath the characters on the map.
 ──────────────────────────────────────────────────────────────────────────────
 ■ Features
   o Set which pictures would appear under the characters.
   o The selected pictures will appear above tiles but below characters.
 ──────────────────────────────────────────────────────────────────────────────
 ■ Methods Aliased
   o Spriteset_Map.create_pictures
   o Sprite_Picture.update
 ──────────────────────────────────────────────────────────────────────────────
 ■ Thanks
   Woratana for making the script this was ported from.
 ──────────────────────────────────────────────────────────────────────────────
 ■ Changelog (MM/DD/YYYY)
   v1    (2/22/2009) - Initial release.
   v1 Ace(4/25/2012) - Ported to Ace.

=end

#===============================================================================​
# * Configuration
#===============================================================================​
module Picture_Below
  ID_From = 15  # Set from which picture IDs will appear under the characters.
  ID_To   = 20  # Set which picture ID this stops at.
end

#==============================================================================
# ** Spriteset_Map
#------------------------------------------------------------------------------
#  This class brings together map screen sprites, tilemaps, etc.
#  It's used within the Scene_Map class.
#==============================================================================

class Spriteset_Map
  #---------------------------------------------------------------------------
  # * Alias Listings
  #---------------------------------------------------------------------------
  unless method_defined?(:wora_picbelow_create_pictures)
    alias_method(:wora_picbelow_create_pictures, :create_pictures)
  end
  #--------------------------------------------------------------------------
  # * Create Picture Sprite
  #--------------------------------------------------------------------------
  def create_pictures
    wora_picbelow_create_pictures
    for i in Picture_Below::ID_From..Picture_Below::ID_To
      # Create picture below player in viewport1.
      @picture_sprites[i] = Sprite_Picture.new(@viewport1,
        $game_map.screen.pictures[i])
    end
  end
end

#==============================================================================
# ** Sprite_Picture
#------------------------------------------------------------------------------
#  This sprite is used to display the picture.It observes the Game_Character
#  class and automatically changes sprite conditions.
#==============================================================================

class Sprite_Picture < Sprite
  #---------------------------------------------------------------------------
  # * Alias Listings
  #---------------------------------------------------------------------------
  unless method_defined?(:wora_picbelow_update)
    alias_method(:wora_picbelow_update, :update)
  end
  #--------------------------------------------------------------------------
  # * Frame Update
  #--------------------------------------------------------------------------
  def update
    wora_picbelow_update
    self.z = $game_player.screen_z - 1 if (@picture.number >=
      Picture_Below::ID_From and @picture.number <= Picture_Below::ID_To)
  end
end
&&&&&&&&&&&&&&&&

**
Rep:
Level 30
GIAW 14: 1st Place (Hard Mode)
It's not perfect as it sets all events higher rather than just the player, but it's more than enough for what I need.

Thanks.  :yuyu:

 I think that this website is very informative.