• Just a reminder that providing specifics on, sharing links to, or naming websites where ROMs can be accessed is against the rules. If your post has any of this information it will be removed.
  • Ever thought it'd be cool to have your art, writing, or challenge runs featured on PokéCommunity? Click here for info - we'd love to spotlight your work!
  • Welcome to PokéCommunity! Register now and join one of the best fan communities on the 'net to talk Pokémon and more! We are not affiliated with The Pokémon Company or Nintendo.

Script: Game Over

FL

Pokémon Island Creator
  • 2,545
    Posts
    14
    Years
    • Seen today
    [PokeCommunity.com] Game Over
    [PokeCommunity.com] Game Over

    When a switch is on, its activates a game over when the player lose.

    Link

    Tested on Essentials v19.1 and v20.1. More versions (v12-18.1) on link. If this script isn't working on latest Essentials version, please inform on this thread.
     
    Last edited by a moderator:
    Where would I put: pbLoadRpgxpScene(Scene_Gameover.new) if $game_switches[GAMEOVERSWITCH]

    Would I put it after line 1736, or on line 1736? Also I want to play a song when the game over screen is displayed, how would I go about putting that in?
     
    Last edited:
    The English is not the best but.

    # To this script works, put it above main and, in PokemonField script
    # section before line
    # 'if $PokemonGlobal.pokecenterMapId && $PokemonGlobal.pokecenterMapId>=0' add
    # line 'pbLoadRpgxpScene(Scene_Gameover.new) if $game_switches[GAMEOVERSWITCH]'

    Translated

    # For this script to work, put it above main script section... After that, in PokemonField script
    # section before line
    # 'if $PokemonGlobal.pokecenterMapId && $PokemonGlobal.pokecenterMapId>=0' add
    # line 'pbLoadRpgxpScene(Scene_Gameover.new) if $game_switches[GAMEOVERSWITCH]'
     
    The English is not the best but.

    # To this script works, put it above main and, in PokemonField script
    # section before line
    # 'if $PokemonGlobal.pokecenterMapId && $PokemonGlobal.pokecenterMapId>=0' add
    # line 'pbLoadRpgxpScene(Scene_Gameover.new) if $game_switches[GAMEOVERSWITCH]'

    Translated

    # For this script to work, put it above main script section... After that, in PokemonField script
    # section before line
    # 'if $PokemonGlobal.pokecenterMapId && $PokemonGlobal.pokecenterMapId>=0' add
    # line 'pbLoadRpgxpScene(Scene_Gameover.new) if $game_switches[GAMEOVERSWITCH]'
    I updated the topic with your description. Thanks for your help!
     
    No problem at all glad to give you help since you've gave me help in the past :)
     
    Hello,

    I'm using version 17.2 with Elite Battle System.
    I can't find the PokemonField script in the script editor.
    Can someone help me?

    (Sorry for my bad English i'm French)
     
    Thanks FL !

    But I still have a problem. the line 'if $PokemonGlobal.pokecenterMapId && $PokemonGlobal.pokecenterMapId>=0' is not in the PField_Field.
    I tried to add the line 'pbLoadRpgxpScene(Scene_Gameover.new) if $game_switches[GAMEOVERSWITCH]' before this line '$PokemonGlobal.pokecenterMapId = $game_map.map_id'
    But it doesn't work...
     
    Last edited:
    Thanks FL !

    But I still have a problem. the line 'if $PokemonGlobal.pokecenterMapId && $PokemonGlobal.pokecenterMapId>=0' is not in the PField_Field.
    I tried to add the line 'pbLoadRpgxpScene(Scene_Gameover.new) if $game_switches[GAMEOVERSWITCH]' before this line '$PokemonGlobal.pokecenterMapId = $game_map.map_id'
    But it doesn't work...
    The correct script section is PField_Visuals. Thread edited.
     
    I still have problems with this script. Im also using Essentials 17.2
    I added the script above main as instructed and then added the all the lines mentioned, see attachment images.
    To be sure I also added a gameover screen and ME in System with F9
    I then turned the according switch on and lost a battle on purpose, however the script still doesn't work for me and the game still sends me back to the last pokecenter.
    Did I do somehting wrong or is there somehting else I may have skipped?
     

    Attachments

    • [PokeCommunity.com] Game Over
      Pfield_Visuals.png
      24.4 KB · Views: 14
    • [PokeCommunity.com] Game Over
      PokeBattle_Battle.png
      25.1 KB · Views: 13
    • [PokeCommunity.com] Game Over
      scene gameover.JPG
      111.9 KB · Views: 12
    I still have problems with this script. Im also using Essentials 17.2
    I added the script above main as instructed and then added the all the lines mentioned, see attachment images.
    To be sure I also added a gameover screen and ME in System with F9
    I then turned the according switch on and lost a battle on purpose, however the script still doesn't work for me and the game still sends me back to the last pokecenter.
    Did I do somehting wrong or is there somehting else I may have skipped?
    Everything looks right.

    Did the right switch is turned on when you lose?
    Maybe is another script interfering. Try with Vanilla Essentials.
     
    hey this works perfect thanks! where do I put my custom image and sound I didnt find the section in debug? can i just be given the naming convention and folder I can manually place them please, thanks!
     
    nvermind I found it in the actual system settings, I was looking in debug mode...
    but the issue now is the music event does not end when it goes back to main menu, it carries on?
     
    nvermind I found it in the actual system settings, I was looking in debug mode...
    but the issue now is the music event does not end when it goes back to main menu, it carries on?
    Fixed!

    this would be very cool for a nuzlocke based game, is there a way to make it delete the save if you black out?
    Before line 'raise Reset.new' add
    Code:
            savefile = RTP.getSaveFileName("Game.rxdata")
            begin; File.delete(savefile); rescue; end
            begin; File.delete(savefile+".bak"); rescue; end
     
    Hello, I'm struggling making a game over function. I tried to do it my myself, but it does not work.

    I copied the script from a fresh project Scene_Gameover and added a line at the end to call the title screen.

    [PokeCommunity.com] Game Over


    The game over screen show as intended and I'm getting back to the title screen, BUT when I choose to load the game, it does not work. I'm getting back at the end of the battle I just lost and going to Pokémon center. And finally, the game crashes.

    [PokeCommunity.com] Game Over


    I'm using the latest version of Essentials : 19.1

    I just want a true game over for dungeons in my game.

    Thanks in advance for the help.
     
    Back
    Top