Cannot tint screen during Game Over

For some reason, I cannot tint the screen when the game over event runs. The only thing happens is that the game freezes for 180 frames, and then go to the game over event. I don't understand why this happens. And no, Fiber.yield doesn't work at all. And I want to tint the screen in both in map and in the battle screen.

Here's the snippet:
Code:
  #--------------------------------------------------------------------------
  # * Start Processing
  #--------------------------------------------------------------------------
  def start
    super
  n = 180
  tone = Tone.new(204,-34,-34,200)
  $game_map.screen.start_tone_change(tone, 180)
  play_gameover_music
  Graphics.wait(n)                 
  fadeout_frozen_graphics
    create_background
    create_command_window
  end
Where did you edit/make that method?
The gameover scene does not have a "screen" to tint, that is an entirely different scene, not connected to the map in any way.
So, if it is in the Scene_Gameover class, that will not work.

If it is somewhere else, it still won't work, the map screen change only works on the map scene.
Technically speaking, it was from a script that overwrote the Scene_Gameover. Is it possible to tint the screen before it switches over to the game over screen (before it fades out, to be exact.
You could try to use a gameover common event script.
Since you are trying to change the map tone and not the battle tone, I guess, you need this for map death events, so you could try my script.
Here is the link:

Just tint the screen in the common event, and call the real gameover scene after that.

Wow, it directly shows pastebin code from links? O_O
This is awesome! *-*
Uh, @Hudell , I get an error on line 57 where it expect { .
Also, will this work in battles as well? Most of the time where the player gets a Game Over is in battles (exapmle: one mission requires protecting a party member can result in a Game Over).
Line 57 of what? 😳
Oh, sorry. Line 51 on your script. @Sixth
Also, I mentioned you by mistake, @Hudell . Really sorry.
My script only works on the map, not in battles.
You could get Yanfly's Death Common Events script for battles if needed.

Line 51 of my script is the setting area, so I guess, you forgot to put a comma at the end or something similar.
Recheck your settings for typos, missing commas.

Original thread: https://forums.rpgmakerweb.com/threads/cannot-tint-screen-during-game-over.74526/