Chaos Project

RPG Maker => RPG Maker Scripts => Script Requests => Topic started by: Zexion on June 22, 2011, 12:50:08 am

Title: Pictures display over everything?
Post by: Zexion on June 22, 2011, 12:50:08 am
I'm not sure if this is a script edit or not, but I need pictures displayed with the "show picture" event to be shown over everything on the screen *particularly the text box*  if you show a picture, the textbox will cover it, and I want to show a face picture OVER the text box, and if i show it through the AMS, it wont show the picture outside of the message box, so I need a script that will change the show picture command to show a picture over everything.
Title: Re: Pictures display over everything?
Post by: G_G on June 22, 2011, 06:33:17 am
Try this. :)

class Sprite_Picture < Sprite
  def update
    super
    # If picture file name is different from current one
    if @picture_name != @picture.name
      # Remember file name to instance variables
      @picture_name = @picture.name
      # If file name is not empty
      if @picture_name != ""
        # Get picture graphic
        self.bitmap = RPG::Cache.picture(@picture_name)
      end
    end
    # If file name is empty
    if @picture_name == ""
      # Set sprite to invisible
      self.visible = false
      return
    end
    # Set sprite to visible
    self.visible = true
    # Set transfer starting point
    if @picture.origin == 0
      self.ox = 0
      self.oy = 0
    else
      self.ox = self.bitmap.width / 2
      self.oy = self.bitmap.height / 2
    end
    # Set sprite coordinates
    self.x = @picture.x
    self.y = @picture.y
    self.z = @picture.number + 1000
    # Set zoom rate, opacity level, and blend method
    self.zoom_x = @picture.zoom_x / 100.0
    self.zoom_y = @picture.zoom_y / 100.0
    self.opacity = @picture.opacity
    self.blend_type = @picture.blend_type
    # Set rotation angle and color tone
    self.angle = @picture.angle
    self.tone = @picture.tone
  end
end


Lemme know if it works.
Title: Re: Pictures display over everything?
Post by: Zexion on June 22, 2011, 12:34:34 pm
hmm it didn't work unless I was supposed to replace something not just make a new script lol
Title: Re: Pictures display over everything?
Post by: nathmatt on June 22, 2011, 01:05:37 pm
this should work he missed a 0 @game_guy y did you copy the whole thing

Spoiler: ShowHide
class Sprite_Picture < Sprite
 
  alias higher_z_update update
  def update
    higher_z_update
    self.z = 10000+@picture.number
  end
end
Title: Re: Pictures display over everything?
Post by: Zexion on June 22, 2011, 01:20:09 pm
still didn't work :(
Title: Re: Pictures display over everything?
Post by: stripe103 on June 22, 2011, 01:26:43 pm
I think you need to show images for us to know what you want to really do. With that you said, you could either want it to change the Z order(the script posted already) or have it another Y value.
Make images. Its enough if you make them in paint.
Title: Re: Pictures display over everything?
Post by: Zexion on June 22, 2011, 01:56:53 pm
Okay I made some pictures :)

This is what happens when I use the show picture command:
Spoiler: ShowHide
(http://img217.imageshack.us/img217/8329/currentv.png)

This is what I want to happen:
Spoiler: ShowHide
(http://img225.imageshack.us/img225/1121/whatiwant.png)


if i use the ams to show the picture, then the windowskin border gets in the way.
Title: Re: Pictures display over everything?
Post by: winkio on June 22, 2011, 02:06:26 pm
so to be more clear, you want the picture to show on top of the message window, right?
Title: Re: Pictures display over everything?
Post by: G_G on June 22, 2011, 02:20:24 pm
Yes. I thought changing the Z coordinate would do it but....
Title: Re: Pictures display over everything?
Post by: Zexion on June 22, 2011, 02:35:33 pm
yes on top of the message window :p
Title: Re: Pictures display over everything?
Post by: G_G on June 22, 2011, 02:44:33 pm
Try this!
class Spriteset_Map
  alias gg_pics_are_higher_lat initialize
  def initialize
    gg_pics_are_higher_lat
    @viewport2.z = 10000
  end
end
Title: Re: Pictures display over everything?
Post by: Zexion on June 22, 2011, 06:15:29 pm
Success!!

Edit:Spoke to soon, for some reason after the first map cutscene, it stops showing message windows? It only shows the picture and nothing else but I can still hear the sound of the text playing. Another wierd thing is that on the first map it works perfectly.