Submit Your Article


 
RPG Maker

Welcome Guest ( Log In | Register )


  Games Resources RPG Maker VX RPG Maker XP Scripts Tutorials Downloads

 
Reply to this topicStart new topic
> Tinting issues?
Adrien.
post Aug 31 2011, 11:38 AM
Post #1


Bet Mapper
Group Icon

Group: Banned
Posts: 1,632
Type: Mapper
RM Skill: Advanced




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






__________________________



Games I am working on | Each image is a link to the game
Go to the top of the page
 
+Quote Post
   
Adrien.
post Sep 1 2011, 09:17 AM
Post #2


Bet Mapper
Group Icon

Group: Banned
Posts: 1,632
Type: Mapper
RM Skill: Advanced




help?


__________________________



Games I am working on | Each image is a link to the game
Go to the top of the page
 
+Quote Post
   
Night5h4d3
post Sep 1 2011, 09:41 AM
Post #3


The past tense
Group Icon

Group: +Gold Member
Posts: 1,199
Type: Scripter
RM Skill: Undisclosed




First off, please don't bump within 3 days of your previous post.
Secondly, you have:
CODE
self.z = -1 if fixed
which will obviously put the tint picture below pretty much everything, thus causing the clipping issue. change that value higher, and that'll fix your problem.


__________________________
Got 30 minutes? Then you've enough time to play this awesome game:

- potentially promising project page
- thanks holder
My growing space of user-bars:

about me:







I made the following!





Go to the top of the page
 
+Quote Post
   
Adrien.
post Sep 1 2011, 09:45 AM
Post #4


Bet Mapper
Group Icon

Group: Banned
Posts: 1,632
Type: Mapper
RM Skill: Advanced




Will that kip other pictures and scripts like weather effects to remain ABOVE the fixed picture?

Still NOT working. I set it to 9999 just to test, other values were 100, 10, 500 and 1000

--> the self.x = -1 if fixed must remain -1 if the weather effects are to go OVER the fixed image and other pictures are to sit ABOVE the fixed image. This issue only seems to get buggy with specific maps. why I do not know. Some maps have this issue others do not.

Issues fixed.

This post has been edited by Adrien.: Sep 1 2011, 10:01 AM


__________________________



Games I am working on | Each image is a link to the game
Go to the top of the page
 
+Quote Post
   
Night5h4d3
post Sep 1 2011, 10:21 AM
Post #5


The past tense
Group Icon

Group: +Gold Member
Posts: 1,199
Type: Scripter
RM Skill: Undisclosed




I have to ask, what picture are you using for the tint? apart from that, are you using any other custom scripts? namely ones that modify spriteset_map?


__________________________
Got 30 minutes? Then you've enough time to play this awesome game:

- potentially promising project page
- thanks holder
My growing space of user-bars:

about me:







I made the following!





Go to the top of the page
 
+Quote Post
   
Adrien.
post Sep 1 2011, 10:32 AM
Post #6


Bet Mapper
Group Icon

Group: Banned
Posts: 1,632
Type: Mapper
RM Skill: Advanced




QUOTE (Night5h4d3 @ Sep 1 2011, 10:21 AM) *
I have to ask, what picture are you using for the tint? apart from that, are you using any other custom scripts? namely ones that modify spriteset_map?



the issue was I was going: tint picture, tint screen fixed image

it should have been fixed image, screen, picture

changing that fixed the issue biggrin.gif


__________________________



Games I am working on | Each image is a link to the game
Go to the top of the page
 
+Quote Post
   

Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 

Lo-Fi Version Time is now: 21st May 2013 - 12:53 PM
RPG RPG Revolution is an Privacy Policy and Legal
eXTReMe Tracker