05-10-2007, 01:00 PM
Screen Color Recaller
by avatarmonkeykirby
May 10 2007
Module to add, anywhere above Main is fine.
Use this to remember the screen color.
Use this to recall it (replacing n with the number of frames)
Attached File(s)
Screen_Color_Module.rar (Size: 284.82 KB / Downloads: 1)
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.
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)
Screen_Color_Module.rar (Size: 284.82 KB / Downloads: 1)