Envision, Create, Share

Welcome to HBGames, a leading amateur game development forum and Discord server. All are welcome, and amongst our ranks you will find experts in their field from all aspects of video game design and development.

[Filled] memorize and restore color tone request

I looked around in the stickies and used the search feature several times but I couldn't find this script. I think ccoa made something like this some while back. If someone could please find this or make one that would be very helpful.

I need a script that:
-Memorizes the current screen color tone
-Restores that color tone via script call (with a paramater for number of frames)
 

poccil

Sponsor

Here.  Put it in a new script section before the last section in the script editor.

Code:
class Game_System
  attr_writer :memorizedTone
  # Retrieves the currently memorized tone
  def memorizedTone
    @memorizedTone=Tone.new(0,0,0,0) if @memorizedTone.equal?(nil)
    return @memorizedTone
  end
  # Memorizes a tone
  def toneMemorize
    @memorizedTone=$game_screen.tone.clone
    return true
  end
  # Restores a memorized tone, with optional duration
  def toneRestore(duration=20)
    $game_screen.start_tone_change(self.memorizedTone,duration)
    return true
  end
end

To save the current tone, call $game_system.toneMemorize .
To restore the current tone, call $game_system.toneRestore(duration) , where duration is the number of frames.  duration is optional and defaults to 20.
 

Thank you for viewing

HBGames is a leading amateur video game development forum and Discord server open to all ability levels. Feel free to have a nosey around!

Discord

Join our growing and active Discord server to discuss all aspects of game making in a relaxed environment. Join Us

Content

  • Our Games
  • Games in Development
  • Emoji by Twemoji.
    Top