So the following script allows me to use images that sit above the player in terms of the player walking under it. such images use the word [FIXED] as they are fixed in place. This script is generally used with parallaxing maps. when you have the ground level and then you use this script to set over head things like beams, tops of trees and what not.
How ever as you can see in the image, there is a tinting issue. The screen and the image must both be tinted as you can see from the event. How ever if you look at the base objects (the ground objects - trunks of trees) and then look at the "over layer" (tops of trees you can walk "behind or under") you'll notice a obvious tinting issue.
The script is posted bellow - your help is appreciated:
You see the obvious tint issue
Set up the event. We call the picture, we set the tint of both the screen AND the image
There is one thing with this script, it was altered so that other events like raid did not end up BEHIND the top layer picture, but stayed in front.
CODE
#==============================================================================
# Sprite_Picture
#==============================================================================
class Sprite_Picture < Sprite
#--------------------------------------------------------------------------
# Update (Overwrite)
#--------------------------------------------------------------------------
def update
super
if @picture_name != @picture.name
@picture_name = @picture.name
if @picture_name != ""
self.bitmap = Cache.picture(@picture_name)
end
end
if @picture_name == ""
self.visible = false
else
fixed = @picture_name.include?("[FIXED]") ? true : false
self.visible = true
if @picture.origin == 0
self.ox = 0
self.oy = 0
else
self.ox = self.bitmap.width / 2
self.oy = self.bitmap.height / 2
end
self.x = @picture.x
self.y = @picture.y
# added
self.x += (self.ox - ($game_map.display_x / 8)) if fixed
self.y += (self.oy - ($game_map.display_y / 8)) if fixed
self.z = 100 + @picture.number
self.z = -1 if fixed
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
self.angle = @picture.angle
self.tone = @picture.tone
end
end
end