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.

Find Current Screen Tone

Is there any way I can find the current screen tone (even if it is changing), and return it in 4 variables (as in the colors and the grayness). I want to make a script that can check the current tone before a change, and then use the returned values as a base to manipulate the tone. I was also wondering what happens if you try to initiate two changes in tone at once. For example, if you wanted to start one change halfway through another. (I suspect that the new change will override the old change, even if its currently in progress)
 

khmp

Sponsor

Getting the current tone of the screen:
Code:
tone = $game_screen.tone.dup

Manipulating a Tone object:
Code:
tone_object = Tone.new(0, 0, 0, 0)
tone_object.red = (-255...255)
tone_object.green = (-255...255)
tone_object.blue = (-255...255)
tone_object.gray = (-255...255)

Changing the tone on screen from whatever the current tone is:
Code:
$game_screen.start_tone_change(tone_object, duration)

I hope that helps. If you need any more help don't hesitate to ask.

Good luck with it Glitchfinder! :thumb:
 

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