Main Menu
  • Welcome to The RPG Maker Resource Kit.

[RESOLVED] Tint

Started by Countdown, October 29, 2010, 05:19:33 PM

0 Members and 1 Guest are viewing this topic.

Countdown

Anybody know of any script that will make it so that you can assign a tint to a map instead of have to do it through events? So that in the map's name you could put something to make it so that it automatically will be that shade?

Kilplix

Well I don't believe anyone would make a script due to it being able to be done in an event. Just make an event,parallel process, and insert the tint screen. Thats how I did it.

Deity

Hay Dark,
here you go :P
#==============================================================================
# Instructions
#==============================================================================
# To setup a tone just use the mapname. You've to use this tag:
# \T[red,green,blue,gray]
# All Values have to be between -255 and 255. The gray value can be left out if
# unneeded.
# For example:
# => \T[200,0,0]
# or with a gray value:
# => \T[200,0,0,100]
#==============================================================================
# ** Game_Map
#==============================================================================
class Game_Map
  #--------------------------------------------------------------------------
  # * Return name of current map
  #--------------------------------------------------------------------------
  def name
    return load_data("Data/MapInfos.rvdata")[@map_id].name
  end
  #--------------------------------------------------------------------------
  # * Setup
  #--------------------------------------------------------------------------
  alias setup_worldmap setup unless $@
  def setup(*args)
    setup_worldmap(*args)
    if name[/\\T\[(.+?)\]/i]
      tone = Tone.new(0,0,0)
      data = $1.scan(/\d+/)
      for i in 0...data.size
        case i
        when 0
          tone.red = data[i].to_i
        when 1
          tone.green = data[i].to_i
        when 2
          tone.blue = data[i].to_i
        when 3
          tone.gray = data[i].to_i
        end
      end
      @screen.start_tone_change(tone, 0)
    end
  end
end


Have fun. ;O

Deity
Greetings
DigiDeity


├Work┤
├Contact┤


Countdown

#3
Deity Dude, you are amazing. Once again you have exceeded my expectations!

EDIT: It only tints once and won't update. It ignores the fact that I have different maps that I would like different tints to.

Deity

Hmm the script change the tint if you enter a map.
It allow you to tint the screen if you want again but maybe I just don't understand your problem. x_X

Deity
Greetings
DigiDeity


├Work┤
├Contact┤