Multiple game over screens

Hello, Ive been looking for a way to add more than one game over screen for my rpg maker vx ace game
I found a code snippet what allows me to add one extra game over screen

Spoiler: code snippet
class Scene_Gameover < Scene_Base

def create_background

@sprite = Sprite.new

if !$game_switches[55]

@sprite.bitmap = Cache.system("GameOver")

else

@sprite.bitmap = Cache.system("GameOver2")

end

end

end

The problem I'm having is that I want to add at least 2 or 3 more screens and if I try to add another else brach or another if branch it doesnt' work
Note that I'm very new to coding so it surely is something I'm doing wrong
Can anyone tell me how I can add more game over screens and what I'm doing wrong?
Thank you
My Ruby knowledge is very limited, but let's see if i can do this.
Try this:
Ruby:
class Scene_Gameover < Scene_Base

def create_background

@sprite = Sprite.new

if $game_switches[55]

@sprite.bitmap = Cache.system("GameOver2")

elsif $game_switches[56]

@sprite.bitmap = Cache.system("GameOver3")
   
elsif $game_switches[57]

@sprite.bitmap = Cache.system("GameOver4")
   
else
   
@sprite.bitmap = Cache.system("GameOver")

end

end

end

So what this is meant to do is check if the one of the following switches is active.
- If switch 55 is active use image "GameOver2"
- If switch 56 is active use image "GameOver3"
- If switch 57 is active use image "GameOver4"
- If none of the switches are active then load the default image which is "GameOver" in this case.

You just have to change the numbers between the square brackets so that the game looks at the switches you actually want it to.
And of course, make sure to also change the "GameOver2", "GameOver3", "GameOver4" filenames to the actual files you plan on using.

If you want to add more ending screens just add something like this above "else" keyword, with the switch number and correct filename.

Ruby:
elsif $game_switches[57]

@sprite.bitmap = Cache.system("GameOver4")

# add an "elsif" statement above the "else" statement

My Ruby knowledge is very limited, but let's see if i can do this.
Try this:
Ruby:
class Scene_Gameover < Scene_Base

def create_background

@sprite = Sprite.new

if $game_switches[55]

@sprite.bitmap = Cache.system("GameOver2")

elsif $game_switches[56]

@sprite.bitmap = Cache.system("GameOver3")
  
elsif $game_switches[57]

@sprite.bitmap = Cache.system("GameOver4")
  
else
  
@sprite.bitmap = Cache.system("GameOver")

end

end

end

So what this is meant to do is check if the one of the following switches is active.
- If switch 55 is active use image "GameOver2"
- If switch 56 is active use image "GameOver3"
- If switch 57 is active use image "GameOver4"
- If none of the switches are active then load the default image which is "GameOver" in this case.

You just have to change the numbers between the square brackets so that the game looks at the switches you actually want it to.
And of course, make sure to also change the "GameOver2", "GameOver3", "GameOver4" filenames to the actual files you plan on using.

If you want to add more ending screens just add something like this above "else" keyword, with the switch number and correct filename.

Ruby:
elsif $game_switches[57]

@sprite.bitmap = Cache.system("GameOver4")

# add an "elsif" statement above the "else" statement
It works!
Thank you so much

Original thread: https://forums.rpgmakerweb.com/threads/multiple-game-over-screens.174266/