Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Screen Color Recaller
#1
Screen Color Recaller
by avatarmonkeykirby
May 10 2007

This is a locked, single-post thread from Creation Asylum. Archived here to prevent its loss.
No support is given. If you are the owner of the thread, please contact administration.


Module to add, anywhere above Main is fine.
Code:
#===============================================================================

#This is to remember screen colors and recall them later
#By AvatarMonkeyKirby
#-------------------------------------------------------------------------------
#Use Screen_Color.mem to memorize the screen color
#Use Screen_Color.mem(n) to recall the screen color. Replace n
#with the amount of time for the screen to change. It's in frames,
#20 frames = 1 second. YOU MUST PUT A NUMBER IN THE "( )" OR IT WILL CRASH!
#===============================================================================

module Screen_Color
  def self.mem
    #$game_screen.start_tone_change(Tone.new($game_screen.tone.red, $game_screen.tone.green, $game_screen.tone.blue, $game_screen.tone.gray), )
    @colorred = $game_screen.tone.red
    @colorgreen = $game_screen.tone.green
    @colorblue = $game_screen.tone.blue
    @colorgray = $game_screen.tone.gray
  end
  
  def self.recall(duration)
    #the following block is to prevent crashing when you recall
    #with out memorizing first.
    if @colorred == nil
      @colorred = 0
    end
    if @colorgreen == nil
      @colorgreen = 0
    end
    if @colorblue == nil
      @colorblue = 0
    end
    if @colorgray == nil
      @colorgray = 0
    end
    #end block
    $game_screen.start_tone_change(Tone.new(@colorred, @colorgreen, @colorblue, @colorgray), duration)
  end
end




Use this to remember the screen color.
Code:
Screen_Color.mem


Use this to recall it (replacing n with the number of frames)
Code:
Screen_Color.recall(n)



Attached File(s)

.rar   Screen_Color_Module.rar (Size: 284.82 KB / Downloads: 1)
}


Possibly Related Threads…
Thread Author Replies Views Last Post
  Resize the playing screen corbaque 0 1,762 08-30-2007, 01:00 PM
Last Post: corbaque
  Screen Selection Window danjchau 0 2,199 01-26-2007, 01:00 PM
Last Post: danjchau
  Change color of text in game corbaque 0 1,727 11-05-2006, 01:00 PM
Last Post: corbaque



Users browsing this thread: