Scripts & Tutorials This forum is for scripts and code, as well as all kinds of tutorials, software, tools and so forth. Remember to give credit!
The thread revival limit does not apply here.

Reply
 
Thread Tools
  #1    
Old May 26th, 2013 (11:16 AM). Edited June 2nd, 2013 by FL.
FL's Avatar
FL FL is offline
Pokémon Island Creator
     
    Join Date: Sep 2010
    Gender: Male
    Posts: 1,698

    Code:
    #===============================================================================
    # * Game Over - by FL (Credits will be apreciated)
    #===============================================================================
    #
    # This script is for Pokémon Essentials. When a switch is on, its activates a
    # game over when the player lose a battle instead of going to last healing spot.
    #
    #===============================================================================
    # 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]'.
    #
    # If you wish to don't display the money lost message, in PokeBattle_Battle
    # script section, after line 'moneylost=pbMaxLevel(@party1)' add line
    # 'moneylost=0 if (!canlose && $game_switches[GAMEOVERSWITCH])'.
    #
    # This script is the RPG Maker XP Scene_Gameover with a single line
    # commented and two line added as you can see below, so you can define the
    # game Over ME and graphic in the RPG Maker XP system database (F9).
    # Please note that Essentials uses a different screen size (the default is
    # 512x384), so the game over graphic must match.
    #
    #===============================================================================

    # The switch number that need to be ON in order to allows a game over GAMEOVERSWITCH = 60

    # Using the equivalent of the commented line ($scene = Scene_Map.new) # throws some strange behaviors, so I prefer to raise a reset at scene end

    #============================================================================== # ** Scene_Gameover #------------------------------------------------------------------------------ # This class performs game over screen processing. #==============================================================================

    class Scene_Gameover #-------------------------------------------------------------------------- # * Main Processing #-------------------------------------------------------------------------- def main # Make game over graphic @sprite = Sprite.new @sprite.bitmap = RPG::Cache.gameover($data_system.gameover_name) # Stop BGM and BGS $game_system.bgm_play(nil) $game_system.bgs_play(nil) # Play game over ME $game_system.me_play($data_system.gameover_me) # Execute transition Graphics.transition(120) # Main loop loop do # Update game screen Graphics.update # Update input information Input.update # Frame update update # Abort loop if screen is changed if $scene != self break end end # Prepare for transition Graphics.freeze # Dispose of game over graphic @sprite.bitmap.dispose @sprite.dispose # Execute transition Graphics.transition(40) # Prepare for transition Graphics.freeze raise Reset.new # added line # If battle test if $BTEST $scene = nil end end #-------------------------------------------------------------------------- # * Frame Update #-------------------------------------------------------------------------- def update # If C button was pressed if Input.trigger?(Input::C) # Switch to title screen # $scene = Scene_Title.new # commented line $scene = nil; # added line end end end

    Attached Thumbnails
    001-Gameover01-Essentials.jpg‎   001-Gameover01-Essentials2.jpg‎  
    __________________

    Reply With Quote

    Relevant Advertising!

      #2    
    Old May 26th, 2013 (11:40 AM).
    Tayuya of the Sound Four's Avatar
    Tayuya of the Sound Four Tayuya of the Sound Four is offline
       
      Join Date: Jan 2013
      Gender: Female
      Posts: 31

      This is pretty cool, I can't think of anything I could use it for personally, but others will find it pretty useful, Kudos c:

      Reply With Quote
        #3    
      Old May 29th, 2013 (10:08 AM). Edited May 29th, 2013 by Dylanrockin.
      Dylanrockin's Avatar
      Dylanrockin Dylanrockin is offline
      That guy
         
        Join Date: May 2011
        Age: 21
        Gender: Male
        Nature: Timid
        Posts: 277

        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?

        Reply With Quote
          #4    
        Old May 29th, 2013 (10:46 AM).
        Nickalooose Nickalooose is offline
        --------------------
           
          Join Date: Mar 2008
          Gender: Female
          Posts: 1,309

          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]'

          Reply With Quote
            #5    
          Old June 2nd, 2013 (9:17 AM).
          FL's Avatar
          FL FL is offline
          Pokémon Island Creator
             
            Join Date: Sep 2010
            Gender: Male
            Posts: 1,698

            Quote:
            Originally Posted by Nickalooose View Post
            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!

            __________________

            Reply With Quote
              #6    
            Old June 3rd, 2013 (2:30 PM).
            Nickalooose Nickalooose is offline
            --------------------
               
              Join Date: Mar 2008
              Gender: Female
              Posts: 1,309

              No problem at all glad to give you help since you've gave me help in the past

              Reply With Quote
              Reply
              Quick Reply

              Sponsored Links
              Thread Tools

              Posting Rules
              You may not post new threads
              You may not post replies
              You may not post attachments
              You may not edit your posts

              BB code is On
              Smilies are On
              [IMG] code is On
              HTML code is Off

              Forum Jump


              All times are GMT -8. The time now is 9:19 AM.