XP 스크립트

일시정지 스크립트 적용 방법 **

pause 라는 파일을 픽쳐에 넣어주세요.

이름이 꼭 pause 이여야 함.

pause 파일은 만들어서 넣어주세요.

 

 

#==============================================================================
# ** Pausing with F12
#------------------------------------------------------------------------------
# Zeriab
# Version 1.1
# 2009-05-25 (Year-Month-Day)
#------------------------------------------------------------------------------
# * Version History :
#
#   Version 1.0 -------------------------------------------------- (2009-05-22)
#   - First release
#
#   Version 1.1 -------------------------------------------------- (2009-05-25)
#   - The pause image now appears immediately when F12 is pressed.
#   - Transitions are cut short rather than restarted when F12 is pressed.
#------------------------------------------------------------------------------
# * Description :
#
#   This script changes the functionality of pressing F12 during the game
#   from resetting the game to (un)pausing the game. A picture is displayed
#   while the game is paused. (Having a picture is optional)
#------------------------------------------------------------------------------
# * License :
#
#   Copyright (C) 2009  Zeriab
#
#   This program is free software: you can redistribute it and/or modify
#   it under the terms of the GNU Lesser Public License as published by
#   the Free Software Foundation, either version 3 of the License, or
#   (at your option) any later version.
#
#   This program is distributed in the hope that it will be useful,
#   but WITHOUT ANY WARRANTY; without even the implied warranty of
#   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
#   GNU Lesser Public License for more details.
#
#   For the full license see <http://www.gnu.org/licenses/>
#   The GNU General Public License: http://www.gnu.org/licenses/gpl.txt
#   The GNU Lesser General Public License: http://www.gnu.org/licenses/lgpl.txt
#------------------------------------------------------------------------------
# * Compatibility :
#
#   Is most likely not compatible with other F12 prevention scripts.
#------------------------------------------------------------------------------
# * Instructions :
#
#   Place this script anywhere above main.
#   The image file 'pause' present in Graphics/Pictures is used.
#   Note: No picture is shown if there is no 'pause' in Graphics/Pictures.
#==============================================================================
 
#=============================================================================
# ** Reset class (because it won't be defined until F12 is pressed otherwise)
#=============================================================================
class Reset < Exception
 
end
#=============================================================================
# ** Module Graphics
#=============================================================================
module Graphics
  class << self
    #-------------------------------------------------------------------------
    # * Aliases Graphics.update and Graphics.transition
    #-------------------------------------------------------------------------
    unless self.method_defined?(:zeriab_f12_pause_update)
      alias_method(:zeriab_f12_pause_update, :update)
      alias_method(:zeriab_f12_pause_transition, :transition)
    end
    #-------------------------------------------------------------------------
    # Change the update method so F12 toggles pause
    #-------------------------------------------------------------------------
    def update(*args)
      # Try to update normally
      begin
        zeriab_f12_pause_update(*args)
        return
      rescue Reset
        # Do nothing
      end
      # F12 has been pressed
      done = false
      # Store frame count
      frame_count = Graphics.frame_count
      # Show pause image
      @sprite = Sprite.new
      @sprite.z = 9999
      begin
        @sprite.bitmap = RPG::Cache.picture('pause')
      rescue
        @sprite.bitmap = Bitmap.new(32,32)
      end
      # Keep trying to do the update
      while !done
        begin
          zeriab_f12_pause_update(*args)
          done = true
        rescue Reset
          # Do Nothing
        end
      end
      # F12 has been released, update until it is pressed again
      while done
        begin
          zeriab_f12_pause_update(*args)
        rescue Reset
          done = false
        end
      end
      # F12 has been pressed, keep trying to update
      while !done
        begin
          zeriab_f12_pause_update(*args)
          done = true
        rescue Reset
          # Do nothing
        end
      end
      # F12 has been released, dispose pause image
      @sprite.dispose
      # Set proper frame count
      Graphics.frame_count = frame_count
    end
    #-------------------------------------------------------------------------
    # Changes the transition so it is cut short if F12 is pressed
    #-------------------------------------------------------------------------
    def transition(*args)
      done = false
      # Keep trying to do the transition
      while !done
        begin
          zeriab_f12_pause_transition(*args)
          done = true
        rescue Reset
          # Set transition length to 0 frames.
          args[0] = 0
        end
      end
    end
  end
end

Comment '13'
  • ?
    Outsider2 2011.03.02 17:48

    와우굉장히좋은스크립트인거같습니다. 유용하게사용하겠습니다.

  • profile
    초아™ 2011.03.05 16:50

    오호~멋져요^^

  • ?
    daisun99 2011.04.30 17:13

    오홍!!1 잘받아 가요!!!

  • ?
    포인트 팡팡 2011.04.30 17:13
    축하합니다. daisun99님은 35포인트에 당첨되셨습니다.
  • ?
    ★밀레니엄★ 2011.05.01 22:30

    오홋!! 일싲ㅇ지라니!!

  • ?
    포인트 팡팡 2011.05.01 22:30
    축하합니다. ★밀레니엄★님은 75포인트에 당첨되셨습니다.
  • profile
    데버 2011.05.11 23:07

    뭘 일시정지하는거죠?

  • profile
    은색바람 2011.05.15 12:07

    다음에는

    sikp 스크립트가 생기면 좋겠네요...

    (이건 이벤트로 할 수 있는건가?)

  • ?
    샤프심 2011.05.31 15:24

    좋네요

  • ?
    David:) 2011.06.06 22:57

    오오 좋으네요 ㅎㅎ 감사합니다 ^^

  • ?
    베넘 2011.07.23 02:45

    감사요-^^

  • ?
    타케찌 2011.10.16 23:40

    읭?

  • ?
    메토즈메군 2012.01.31 11:46

    저는 왜 적용이 않될까요?

    이거 쉬프트로 작동하는거 맞나요?


List of Articles
번호 분류 제목 글쓴이 날짜 조회 수
공지 스크립트 자료 게시물 작성시 주의사항 습작 2012.12.24 6153
» 기타 일시정지 스크립트 13 【§㉤ㅏ법㉧ㅣ§】 2011.02.26 1841
213 기타 일본RPGXP게임에서 번역한 스크립트 입니다. 1 백호 2009.02.22 1735
212 기타 이벤트 범위 스크립트 2 Tine 2012.07.25 1580
211 기타 요리스크립트 (구) 6 *ps인간 2009.01.26 1932
210 기타 요리 시스템 스크립트 12 file 백호 2009.02.21 2022
209 기타 엔딩후 캐릭터 이어서 새로운 게임시작 스크립트 1 file 백호 2009.02.21 1263
208 기타 엔딩에 스탭롤을 도입하는 스크립트 1 file 백호 2009.02.21 1335
207 기타 에어리어 설정 by RPG Advocate 백호 2009.02.22 709
206 기타 업데이트 (죽었을경우부활 )스크립트한글화 2 by향온 2011.09.27 2438
205 기타 어디에 쓰이는지 불확실한 스크립트 1 백호 2009.02.22 1063
204 기타 양손무기, 전신갑옷 스크립트 2 백호 2009.02.22 1714
203 기타 액터 선택 스크립트 2 백호 2009.02.21 1228
202 기타 액알 30 지존!! 2010.07.26 5095
201 기타 암울한스크립트? 엔딩후 캐릭터 이어서 새로운 게임시작 스크립트 5 *ps인간 2009.01.26 2533
200 기타 아이디 스크립트 4 백호 2009.02.22 1761
199 기타 아래 스크립트에 대한 Guillaume777님의 개량판입니다. 백호 2009.02.22 880
198 기타 쓸만한스크립트61개포함 28 file 궭크이 2012.01.09 4297
197 기타 쓸 용도가 없지만 마비노기 게임 만들 때 좋죠[장작스크립트] 5 백호 2009.02.22 2408
196 기타 실제시간표시스크립트입니다...[중뷁이면지성;;] 4 백호 2009.02.22 1349
195 기타 시작하자 마자 풀 스크린 2 백호 2009.02.21 1082
Board Pagination Prev 1 2 3 4 5 6 7 8 9 10 11 12 13 Next
/ 13