Pause Script
#1
Pause Script
by Arbiter

I noticed you didn't have a pause script so I thought I would write a quick one, sorry my standards have slipped and I have used scenes, meh, what can you do. I do not usually post scripts as I am very paranoid of criticism and note this is only a small one because you didn't have one already I don't think.
Quote: To pause the game simply press Z on the keyboard while you are on the map
and to unpause just press the Z key again.
Contains a pause graphic - import it into your projects picture folder.

To change the pause graphic import a new graphic into your pictures folder
then go to line 48 and change the word Pause to the name of your graphic.
To change the pause BGM go to line 52 and change the name of the BGM to the
BGM of your choice, 001-Battle01, 002-Battle02 for example.
Code:
#===============================================================================
# Script: Pause
# Version: 1.0
# Author: Arbiter
#===============================================================================
#===============================================================================
# To pause the game simply press Z on the keyboard while you are on the map
# and to unpause just press the Z key again.
# Contains a pause graphic - import it into your projects picture folder.

# To change the pause graphic import a new graphic into your pictures folder
# then go to line 48 and change the word Pause to the name of your graphic.
# To change the pause BGM go to line 52 and change the name of the BGM to the
# BGM of your choice, 001-Battle01, 002-Battle02 for example.
#===============================================================================


class Scene_Pause
   def main
    @spriteset_map = Spriteset_Map.new
    @pause_window = Pause_Window.new
    @pause_window.x = 100
    @pause_window.y = 160
    @pause_window.height = 500
    @pause_window.width = 500
    @pause_window.opacity = 0
    Graphics.transition
    loop do
      Graphics.update
      Input.update
      update
      if $scene != self
        break
      end
    end
    Graphics.freeze
    @pause_window.dispose
  end

  def update
    if Input.trigger?(Input::A)
      $scene = Scene_Map.new
      Audio.bgm_stop
    end
  end
end

class Pause_Window < Window_Base
  def initialize
    super(480, 480, 480, 480)
    self.contents = RPG::Cache.picture("pause")
    Audio.bgm_play("Audio/BGM/018-Field01", 100, 100)
  end
end

class Game_Map
  alias arbiter_pause_update :update
  def update
    arbiter_pause_update
    if Input.trigger?(Input::A)
      $scene = Scene_Pause.new
    else
      $game_system.bgm_play(@map.bgm)
    end
  end
end
Here is the pause graphic, do not laugh it was done quick for semi testing.
Content Hidden

I'm also going to write some tutorials for commands (well paste across ones I have already written) and for windows and others when I get some time.
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
   Script Commands Bug Fixes kyonides 2 346 02-27-2025, 07:24 AM
Last Post: kyonides
   The Steal and Peep Script DerVVulfman 12 809 02-19-2025, 07:20 AM
Last Post: Ace_V
   Text Scroll Script - Enhanced DerVVulfman 23 36,247 02-18-2021, 04:16 AM
Last Post: DerVVulfman
   Cursor Script Selwyn 7 16,294 09-28-2019, 02:13 PM
Last Post: DerVVulfman
   ACBS FIX SCRIPT #2: Advanced Cry Correction DerVVulfman 1 5,074 08-09-2019, 03:42 PM
Last Post: aeliath
   ACBS FIX SCRIPT #1: Victory Cries Patch DerVVulfman 1 5,182 08-08-2019, 02:53 PM
Last Post: aeliath
   Spritesheet Generator Conversion Script DerVVulfman 0 4,591 11-21-2018, 04:48 AM
Last Post: DerVVulfman
   Neo Mode 7 Script by MGCaladtogel MGC 59 130,476 09-29-2017, 03:48 AM
Last Post: DerVVulfman
   Longer Script Calls LiTTleDRAgo 0 5,209 05-17-2017, 12:36 AM
Last Post: LiTTleDRAgo
   SLOLS: Snake Look-alike on Load Script Zeriab 3 11,875 05-14-2017, 06:25 PM
Last Post: LiTTleDRAgo



Users browsing this thread: 1 Guest(s)