VX 스크립트

###############################################################################
#Pause Script Version 1.0                                                                                                                                                  
###############################################################################
module Baelgard


  PAUSE_BUTTON = "X"
  PAUSE_TEXT = "Pause"
  #allow/disallow freezing play time during pause
  STOP_TIME = true
  #Set a switch name to allow/disallow pause
  PAUSE_SW_NAME = "Pause"
  PAUSE_BUTTON2 = eval("Input::#{PAUSE_BUTTON}")
  
  def stopping
    
    viewport1 = Viewport.new(0, 0, 640, 480)
    viewport1.z = 10000

    sprite1 = Sprite.new(viewport1)
    sprite1.tone = Tone.new(0, 0, 0, 0)
    sprite1.bitmap = Cache.system ("pause")
  
    loop do
      Graphics.update
      Input.update
      if Input.trigger?(PAUSE_BUTTON2)
        break
      end
    end

    sprite1.dispose
    sprite1 = nil
   end
  #--------------------------------------------------------------------------

  def can_stop?
    if PAUSE_SW_NAME.is_a?(Numeric)
      return ($game_switches[PAUSE_SW_NAME] rescue true)
    else
      return ($game_switches[$data_system.switches.index(PAUSE_SW_NAME)] rescue true)
    end
   end
  end
#==============================================================================
#  Scene_Map
#==============================================================================

class Scene_Map

  include Baelgard

  alias baelgard_update update
  def update
    if Input.trigger?(PAUSE_BUTTON2) and can_stop?
      tmp = Graphics.frame_count
      stopping
      if STOP_TIME
        Graphics.frame_count = tmp
      end
    end
    baelgard_update
   end
end
#==============================================================================
# Scene_Battle
#==============================================================================

class Scene_Battle
  include Baelgard
  alias baelgard_update update
  def update
    if Input.trigger?(PAUSE_BUTTON2) and can_stop?
      tmp = Graphics.frame_count
       stopping
      if STOP_TIME
        Graphics.frame_count = tmp
      end
    end
    baelgard_update
  end
end
Comment '5'

List of Articles
번호 분류 제목 글쓴이 날짜 조회 수
공지 스크립트 자료 게시물 작성시 주의사항 3 습작 2012.12.24 5453
217 상점 상점 무기, 방어구 능력치 비교 스크립트! 18 불독 2008.12.25 3611
216 기타 이벤트 위치 저장 스크립트 10 Tofuman 2008.12.11 2099
215 기타 디스크 체인져 VX!! (업데이트..) 30 file Tofuman 2008.12.02 3169
214 기타 Crissaegrim Farm BETA 1.0.0 10 Man... 2008.11.22 3095
213 이름입력 모그 이름 바꾸기 한글 변역! 2 Man.... 2008.11.04 4116
212 HUD Crissaegrim HUD 2.0!! 13 Man... 2008.10.29 2853
211 제작도구 최대한 한글로 변혁 했음Window Maker V1.0(대박) 15 Man... 2008.10.29 4675
210 메뉴 Adding Extra Menu in lafia Script 2 Man... 2008.10.29 1575
209 장비 Disposable Ammo(또 있는 곳을 잘 읽으셔야 합니다.) 2 Man... 2008.10.29 1697
208 상점 Shopoholic(한글 설명) 11 Man... 2008.10.29 3188
207 SephirothSpawn's Slanted Bars in VX 1.1 2 Man... 2008.10.28 1572
206 Direction Movement Style 4 Man... 2008.10.28 1719
» 퍼스 스크립트 5 Man... 2008.10.28 1679
204 Repel Effect 1 Man... 2008.10.28 1754
203 전투 Fomars indiviivdual battle 2 Man... 2008.10.28 1348
202 아이템 Item Price Changer 7 Man... 2008.10.28 1536
201 Simple Fon Chage 3 Man... 2008.10.28 1213
200 Screen Resolution 3 Man... 2008.10.28 1172
199 Enable Usage of Rmxp 캐릭터(?) 5 Man... 2008.10.28 2413
198 Multi-threader snippet by Omegazion Man... 2008.10.28 1107
Board Pagination Prev 1 ... 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 Next
/ 32