Tint Problem

I've been experimenting with Vlue's Advanced Game Time in order to fix some bugs with Khas Lighting.
 
A problem that I've been encountering is that every time I go from a non-tinted map to a tinted map, then to the previous map, and then to the tinted map.
 
Here's a video to better explain the problem:

https://www.youtube.com/watch?feature=player_videoeditor&v=r_lt99lxoEg

What I believe is the problem is in these lines highlighted in red:

Spoiler
def use_default
return if self.disposed?
create_contents if self.bitmap.height != Graphics.height
create_contents if self.bitmap.width != Graphics.width
self.visible = SceneManager.scene.is_a?(Scene_Map)
self.visible = true if SceneManager.scene.is_a?(Scene_Battle) and BATTLE_TINT
self.visible = false if SceneManager.scene.is_a?(Scene_Title)
self.visible = false if no_tint
return unless self.visible
min = $game_time.min
return if min == @old_time
@old_time = min
rgba = get_new_tint(min)
return if rgba == @old_tint
@old_tint = rgba
self.bitmap.clear
self.bitmap.fill_rect(0,0,Graphics.width,Graphics.height,Color.new(rgba[0],rgba[1],rgba[2],rgba[3]))
end

def use_khas
begin
temp = $game_map.light_surface.opacity
rescue
return
end
self.visible = false

$game_map.effect_surface.set_color(0,0,0) and $game_map.effect_surface.set_alpha(0) if no_tint
return if no_tint
min = $game_time.min
return if min == @old_time
@old_time = min
rgba = get_new_tint(min)
return if rgba == @old_tint
@old_tint = rgba
$game_map.effect_surface.set_color(rgba[0],rgba[1],rgba[2]) and $game_map.effect_surface.set_alpha(rgba[3])
end
The purple text is the default option where Khas or Victor's Lighting Effects aren't implemented.

The default option works fine without a problem.

Is there anything that can be done to fix this problem?
Hey there, 

I had a similar problem but it was not a scripting issue, what happened was that my events were done wrong, usually instead of using Erase Event on the Tint event, I used "Self-Switch A" and the Switch A page had no Call Tint in it so it worked only once. I then decided to just use Erase Event so it would reset every time I entered into that map.

This may not be the issue you have but I figured it was worth to mention it.

Cheers.
I wish that was the issue, but I don't have any events other than "transfer" here.
I've moved this thread to RGSSx Script Support. Please be sure to post your threads in the correct forum next time. Thank you.


Can you please provide links to the scripts, as well as screenshots of your events that set and remove the tint?
Events:

Spoiler
[IMG]http://i.imgur.com/1QQCceB.png[/IMG]
Spoiler
[IMG]http://i.imgur.com/zxc4y3f.png[/IMG]
Scripts:

http://forums.rpgmakerweb.com/index.php?/topic/3851-advanced-game-time/

http://forums.rpgmakerweb.com/index.php?/topic/4917-khas-awesome-light-effects/

Original thread: https://forums.rpgmakerweb.com/threads/tint-problem.31214/