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 5408
577 전투 XAS Hero Edition VX 15 Alkaid 2011.12.28 4234
576 변수/스위치 Etude87_Variables_VX 1 file 습작 2011.11.26 2608
575 기타 아이디를 띄우기 20 12345678 2011.11.07 4627
574 전투 Animated Battlers VX 3.5 by DerVVulfman 2 Alkaid 2011.11.02 3101
573 스킬 Yanfly Engine RD - Custom Dmg Formulas (커스텀 데미지, 관계도) 6 file communnn 2011.10.25 3377
572 스킬 Yanfly Engine RD - Display Skill Query (스킬 상세 정보) 8 file communnn 2011.10.24 3405
571 기타 Kylock1.2+(RMDude-Kylock1.5) Time System Script 4 file communnn 2011.10.20 2595
570 전투 VX SRPG3d 수정본(1) 12 아이미르 2011.10.19 4620
569 스킬 스킬, 아이템 적아 구분 없이 쓰기 10 file EuclidE 2011.10.16 2900
568 전투 VX SRPG3d(한글번역) 8 file 아이미르 2011.10.15 5036
567 장비 카드 슬롯 장비 스크립트 18 file 아이미르 2011.10.13 4131
566 스킬 Simple Sort Inventory 2.0 by cozziekuns 1 file Alkaid 2011.09.29 2350
565 맵/타일 Roguelike Random Dungeon Generator 2.0 by cozziekuns 4 file Alkaid 2011.09.29 2560
564 메시지 HG_POP_TEXT (맵 화면에 문자 표시) 4 file 허걱 2011.09.16 3589
563 파티 파티원이 따라다니는 스크립트 11 file 놀러 2011.09.15 3988
562 기타 [XP / VX 공용] rand() 함수 확장 스크립트 4 허걱 2011.09.13 2363
561 전투 VX SRPG 스크립트를 수정해봤습니다(8) - 누적수정 30 아이미르 2011.09.09 3916
560 장비 초보적인 장비레벨 개념 스크립트 - 수정 및 덤 9 아이미르 2011.09.06 2657
559 기타 여러스크립트(목적은 포인트) 12 file 인생은 힘들다. 2011.08.26 3088
558 스킬 SW_BookSkill && EchantScroll(상호충돌수정버전) 6 시옷전사 2011.08.22 1758
Board Pagination Prev 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 ... 32 Next
/ 32