Advertisement
TheSixth

Fadeout Screen Color Changer

Dec 2nd, 2016
562
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Ruby 1.61 KB | None | 0 0
  1. =begin
  2.  
  3. - Fadeout screen color changer
  4. - Made by: Sixth
  5.  
  6. This script changes the default fadeout screen color to whatever color you want.
  7. This is the color that will be used for the "Fadeout Screen" event command.
  8. The color can be changed anytime during the game too.
  9.  
  10. To change the color, use this script call:
  11.  
  12.   $game_system.fadeout_screen_color = [R,G,B]
  13.  
  14. Where R, G and B stands for the red, green and blue tone of the color.
  15. These take integer values from 0 to 255.
  16.  
  17. The default fadeout screen color is [0,0,0], which is black.
  18. A white color would be [255,255,255].
  19.  
  20. Place this script right at the top of your custom script list!
  21.  
  22. =end
  23.  
  24. class Game_System
  25.  
  26.   attr_accessor :fadeout_screen_color
  27.  
  28.   def fadeout_screen_color
  29.     @fadeout_screen_color = [0,0,0] if @fadeout_screen_color.nil?
  30.     return @fadeout_screen_color
  31.   end
  32.  
  33. end
  34.  
  35. class Spriteset_Map
  36.  
  37.   def update_viewports
  38.     @viewport1.tone.set($game_map.screen.tone)
  39.     @viewport1.ox = $game_map.screen.shake
  40.     @viewport2.color.set($game_map.screen.flash_color)
  41.     @viewport3.color.set(*$game_system.fadeout_screen_color, 255 - $game_map.screen.brightness)
  42.     @viewport1.update
  43.     @viewport2.update
  44.     @viewport3.update
  45.   end
  46.  
  47. end
  48.  
  49. class Spriteset_Battle
  50.  
  51.   def update_viewports
  52.     @viewport1.tone.set($game_troop.screen.tone)
  53.     @viewport1.ox = $game_troop.screen.shake
  54.     @viewport2.color.set($game_troop.screen.flash_color)
  55.     @viewport3.color.set(*$game_system.fadeout_screen_color, 255 - $game_troop.screen.brightness)
  56.     @viewport1.update
  57.     @viewport2.update
  58.     @viewport3.update
  59.   end
  60.  
  61. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement