Pictures display over everything?

Started by Zexion, June 22, 2011, 12:50:08 am

Previous topic - Next topic

Zexion

June 22, 2011, 12:50:08 am Last Edit: June 22, 2011, 06:27:54 pm by Zexion
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.

G_G

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.

Zexion

hmm it didn't work unless I was supposed to replace something not just make a new script lol

nathmatt

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
Join Dead Frontier
Sorry, I will no longer be scripting for RMXP. I may or may not give support for my scripts. I don't have the will to script in RGSS anymore.
My script


Zexion


stripe103

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.

Zexion

Okay I made some pictures :)

This is what happens when I use the show picture command:
Spoiler: ShowHide

This is what I want to happen:
Spoiler: ShowHide


if i use the ams to show the picture, then the windowskin border gets in the way.

winkio

so to be more clear, you want the picture to show on top of the message window, right?

G_G

Yes. I thought changing the Z coordinate would do it but....

Zexion

yes on top of the message window :p

G_G

Try this!
class Spriteset_Map
  alias gg_pics_are_higher_lat initialize
  def initialize
    gg_pics_are_higher_lat
    @viewport2.z = 10000
  end
end

Zexion

June 22, 2011, 06:15:29 pm #11 Last Edit: June 22, 2011, 06:29:54 pm by Zexion
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.