XP 스크립트





그림의 2에서 보면 플레이어가 메세지창의 가려서
잘 안보이는걸 보실수 있을겁니다


애니메이션등을 사용할때 메세지창에 가려저서
잘 안보이면 이상하겠죠?

그래서 문장옵션을 일일이 지정하는데
그 번거로움을 해소 시키기위한 스크립트 입니다.


#==============================================================================
# 걾 Window_Message
#------------------------------------------------------------------------------
# ?빒뤞?렑궸럊궎긽긞긜?긙긂귻깛긤긂궳궥갃
#==============================================================================

class Window_Message < Window_Selectable
# Start
  #==========================================================================
  # 걶 믦릶궻먠믦
  #==========================================================================
    # 롥릐뚺궻됪뽋뤵Y띆뷭궕댥돷궻릶뭠댥뤵궻렄갂긽긞긜?긙긂귽깛긤긂궕뤵궸?렑궠귢귏궥갃
    UP_DW_POS = 10
# End
  #--------------------------------------------------------------------------
  # 걶 긆긳긙긃긏긣룊딖돸
  #--------------------------------------------------------------------------
  def initialize
    super(80, 304, 480, 160)
    self.contents = Bitmap.new(width - 32, height - 32)
    self.visible = false
    self.z = 9998
    @fade_in = false
    @fade_out = false
    @contents_showing = false
    @cursor_width = 0
    self.active = false
    self.index = -1
  end
  #--------------------------------------------------------------------------
  # 걶 됶뺳
  #--------------------------------------------------------------------------
  def dispose
    terminate_message
    $game_temp.message_window_showing = false
    if @input_number_window != nil
      @input_number_window.dispose
    end
    super
  end
  #--------------------------------------------------------------------------
  # 걶 긽긞긜?긙뢎뿹룉뿚
  #--------------------------------------------------------------------------
  def terminate_message
    self.active = false
    self.pause = false
    self.index = -1
    self.contents.clear
    # ?렑뭷긲깋긐귩긏깏귺
    @contents_showing = false
    # 긽긞긜?긙 긓?깑긫긞긏귩뚁귆
    if $game_temp.message_proc != nil
      $game_temp.message_proc.call
    end
    # 빒뤞갂멗묖럥갂릶뭠볺쀍궸듫궥귡빾릶귩긏깏귺
    $game_temp.message_text = nil
    $game_temp.message_proc = nil
    $game_temp.choice_start = 99
    $game_temp.choice_max = 0
    $game_temp.choice_cancel_type = 0
    $game_temp.choice_proc = nil
    $game_temp.num_input_start = 99
    $game_temp.num_input_variable_id = 0
    $game_temp.num_input_digits_max = 0
    # 긕?깑긤긂귻깛긤긂귩둎뺳
    if @gold_window != nil
      @gold_window.dispose
      @gold_window = nil
    end
  end
  #--------------------------------------------------------------------------
  # 걶 깏긲깒긞긘깄
  #--------------------------------------------------------------------------
  def refresh
    self.contents.clear
    self.contents.font.color = normal_color
    x = y = 0
    @cursor_width = 0
    # 멗묖럥궶귞럻돷궛귩뛱궎
    if $game_temp.choice_start == 0
      x = 8
    end
    # ?렑뫲궭궻긽긞긜?긙궕궇귡뤾뜃
    if $game_temp.message_text != nil
      text = $game_temp.message_text
      # 맕뚥빒럻룉뿚
      begin
        last_text = text.clone
        text.gsub!(/\[Vv][([0-9]+)]/) { $game_variables[$1.to_i] }
      end until text == last_text
      text.gsub!(/\[Nn][([0-9]+)]/) do
        $game_actors[$1.to_i] != nil ? $game_actors[$1.to_i].name : ""
      end
      # 뺇딿뤵갂"\\" 귩 "00" 궸빾듂
      text.gsub!(/\\/) { "00" }
      # "\C" 귩 "01" 궸갂"\G" 귩 "02" 궸빾듂
      text.gsub!(/\[Cc][([0-9]+)]/) { "01[#{$1}]" }
      text.gsub!(/\[Gg]/) { "02" }
      # c 궸 1 빒럻귩롦벦 (빒럻궕롦벦궳궖궶궘궶귡귏궳깑?긵)
      while ((c = text.slice!(/./m)) != nil)
        # \ 궻뤾뜃
        if c == "00"
          # ?뿀궻빒럻궸뽣궥
          c = "\"
        end
        # C[n] 궻뤾뜃
        if c == "01"
          # 빒럻륡귩빾뛛
          text.sub!(/[([0-9]+)]/, "")
          color = $1.to_i
          if color >= 0 and color <= 7
            self.contents.font.color = text_color(color)
          end
          # 렅궻빒럻귉
          next
        end
        # G 궻뤾뜃
        if c == "02"
          # 긕?깑긤긂귻깛긤긂귩띿맟
          if @gold_window == nil
            @gold_window = Window_Gold.new
            @gold_window.x = 560 - @gold_window.width
            if $game_temp.in_battle
              @gold_window.y = 192
            else
              @gold_window.y = self.y >= 128 ? 32 : 384
            end
            @gold_window.opacity = self.opacity
            @gold_window.back_opacity = self.back_opacity
          end
          # 렅궻빒럻귉
          next
        end
        # 둂뛱빒럻궻뤾뜃
        if c == "n"
          # 멗묖럥궶귞긇??깑궻븴귩뛛륷
          if y >= $game_temp.choice_start
            @cursor_width = [@cursor_width, x].max
          end
          # y 궸 1 귩돿럁
          y += 1
          x = 0
          # 멗묖럥궶귞럻돷궛귩뛱궎
          if y >= $game_temp.choice_start
            x = 8
          end
          # 렅궻빒럻귉
          next
        end
        # 빒럻귩?됪
        self.contents.draw_text(4 + x, 32 * y, 40, 32, c)
        # x 궸?됪궢궫빒럻궻븴귩돿럁
        x += self.contents.text_size(c).width
      end
    end
    # 멗묖럥궻뤾뜃
    if $game_temp.choice_max > 0
      @item_max = $game_temp.choice_max
      self.active = true
      self.index = 0
    end
    # 릶뭠볺쀍궻뤾뜃
    if $game_temp.num_input_variable_id > 0
      digits_max = $game_temp.num_input_digits_max
      number = $game_variables[$game_temp.num_input_variable_id]
      @input_number_window = Window_InputNumber.new(digits_max)
      @input_number_window.number = number
      @input_number_window.x = self.x + 8
      @input_number_window.y = self.y + $game_temp.num_input_start * 32
    end
  end
  #--------------------------------------------------------------------------
  # 걶 긂귻깛긤긂궻댧뭫궴븉벁뼻뱗궻먠믦
  #--------------------------------------------------------------------------
  def reset_window
# Start 빾뛛
#    if $game_temp.in_battle
    # 먰벉렄궴롥릐뚺궻됪뽋뤵궳궻Y띆뷭궕UP_DW_OS댥뤵궻렄궼긽긞긜?긙긂귽깛긤긂귩뤵궸?렑
    if $game_temp.in_battle or ($game_system.message_position == 2 and $game_player.y - [$game_map.display_y  / 128 - 1, 0].max >= UP_DW_POS)
# End 빾뛛
      self.y = 16
    else
      case $game_system.message_position
      when 0  # 뤵
        self.y = 16
      when 1  # 뭷
        self.y = 160
      when 2  # 돷
        self.y = 304
      end
    end
    if $game_system.message_frame == 0
      self.opacity = 255
    else
      self.opacity = 0
    end
    self.back_opacity = 160
  end
  #--------------------------------------------------------------------------
  # 걶 긲깒??뛛륷
  #--------------------------------------------------------------------------
  def update
    super
    # 긲긃?긤귽깛궻뤾뜃
    if @fade_in
      self.contents_opacity += 24
      if @input_number_window != nil
        @input_number_window.contents_opacity += 24
      end
      if self.contents_opacity == 255
        @fade_in = false
      end
      return
    end
    # 릶뭠볺쀍뭷궻뤾뜃
    if @input_number_window != nil
      @input_number_window.update
      # 뙂믦
      if Input.trigger?(Input::C)
        $game_system.se_play($data_system.decision_se)
        $game_variables[$game_temp.num_input_variable_id] =
          @input_number_window.number
        $game_map.need_refresh = true
        # 릶뭠볺쀍긂귻깛긤긂귩됶뺳
        @input_number_window.dispose
        @input_number_window = nil
        terminate_message
      end
      return
    end
    # 긽긞긜?긙?렑뭷궻뤾뜃
    if @contents_showing
      # 멗묖럥궻?렑뭷궳궶궚귢궽??긛긖귽깛귩?렑
      if $game_temp.choice_max == 0
        self.pause = true
      end
      # 긌긿깛긜깑
      if Input.trigger?(Input::B)
        if $game_temp.choice_max > 0 and $game_temp.choice_cancel_type > 0
          $game_system.se_play($data_system.cancel_se)
          $game_temp.choice_proc.call($game_temp.choice_cancel_type - 1)
          terminate_message
        end
      end
      # 뙂믦
      if Input.trigger?(Input::C)
        if $game_temp.choice_max > 0
          $game_system.se_play($data_system.decision_se)
          $game_temp.choice_proc.call(self.index)
        end
        terminate_message
      end
      return
    end
    # 긲긃?긤귺긂긣뭷댥둖궳?렑뫲궭궻긽긞긜?긙궔멗묖럥궕궇귡뤾뜃
    if @fade_out == false and $game_temp.message_text != nil
      @contents_showing = true
      $game_temp.message_window_showing = true
      reset_window
      refresh
      Graphics.frame_reset
      self.visible = true
      self.contents_opacity = 0
      if @input_number_window != nil
        @input_number_window.contents_opacity = 0
      end
      @fade_in = true
      return
    end
    # ?렑궥귊궖긽긞긜?긙궕궶궋궕갂긂귻깛긤긂궕됀럨륉뫴궻뤾뜃
    if self.visible
      @fade_out = true
      self.opacity -= 48
      if self.opacity == 0
        self.visible = false
        @fade_out = false
        $game_temp.message_window_showing = false
      end
      return
    end
  end
  #--------------------------------------------------------------------------
  # 걶 긇??깑궻뗩?뛛륷
  #--------------------------------------------------------------------------
  def update_cursor_rect
    if @index >= 0
      n = $game_temp.choice_start + @index
      self.cursor_rect.set(8, n * 32, @cursor_width, 32)
    else
      self.cursor_rect.empty
    end
  end
end
#추천 주세요~

Who's 백호

?

이상혁입니다.

http://elab.kr

Atachment
첨부 '2'

List of Articles
번호 분류 제목 글쓴이 날짜 조회 수
공지 스크립트 자료 게시물 작성시 주의사항 습작 2012.12.24 6153
381 메시지 TXT 메세지 렌더링 스크립트 16 에돌이 2011.07.14 4069
380 전투 Trickster씨의 전투 시스템 (SDK 필수?) Alkaid 2012.09.18 3257
379 메뉴 Trickster's Plug 'n' Play Gradient Bar 2.0 1 file 백호 2009.02.22 2051
378 이동 및 탈것 Trickster's Caterpillar System 0.99 3 Alkaid 2010.12.23 1590
377 스킬 Trickster's Bag of Skill Effects (SDK 필요) Alkaid 2012.09.17 1289
376 스킬 Trickster's Bag of Skill Effects file 백호 2009.02.22 1077
375 그래픽 Transition Pack 1.11 by Fantasist Alkaid 2011.01.22 2043
374 기타 Trailing Characters ver.1 by SephirothSpawn 6 file 백호 2009.02.22 1551
373 변수/스위치 The Self Data Suite by PK8 (XP/VX/VXA) Alkaid 2012.09.14 1232
372 전투 The Lycan ABS by DerVVulfman Alkaid 2013.07.22 1895
371 기타 The General Monster Generator 1.1 by DerVVulfman 1 file Alkaid 2011.03.02 1496
370 영상 The AVI Player 1.3 by DerVVulfman 3 Alkaid 2010.10.08 1707
369 기타 Text to RGSS by DerVVulfman Alkaid 2011.04.18 1319
368 기타 Text Scroll by Dubealex (Release 3) 2 file 백호 2009.02.22 939
367 기타 Tetris Attack by trickster 1 file 백호 2009.02.22 986
366 기타 Terrain Encounter Areas by SephirothSpawn 백호 2009.02.22 778
365 메시지 Taylor's Simple Message System 2000 Alkaid 2020.07.05 242
364 기타 Tax Script 1.2 by The Darklord@rmxp.org 2 file 백호 2009.02.22 1130
363 메뉴 Tales Of Symphonia Menu 8 file 백호 2009.02.21 1744
362 변수/스위치 Switchless Common Events by PK8(XP/VX/VXA) Alkaid 2012.09.15 1199
Board Pagination Prev 1 ... 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 ... 52 Next
/ 52