질문과 답변

Extra Form

class Window_HP < Window_Base
  def initialize
    super(0, 15, 180, 55) # <- location, size
    self.contents = Bitmap.new(width - 32, height - 32)
    self.contents.font = Font.new("Arial", 12) # <- font, size
    self.opacity = 0
    self.back_opacity = 0
  end
  def refresh
    self.contents.clear
    self.contents.draw_text(0, 0, 170, 30, @show_text)
  end
  def actor
    $game_party.actors[0] # <- 파티 0번째
  end
  def update
    super
    text = sprintf("exp : %4d / %4d", actor.exp_s, actor.next_exp_s)
    if @show_text != text
      @show_text = text
      refresh
    end
  end
end

class Scene_Map
  alias update_window_hp update
  def update
    update_window_hp
    @window_hp = Window_HP.new unless @window_hp
    @window_hp.update
    unless $scene.is_a?(Scene_Map)
      @window_hp.dispose
      @window_hp = nil
    end
  end
end

 

 

 

 

 

 

위 스크립트를 오프닝에서 안나타나게 하려고하는데 도무지 방법을 모르겠네요 ㅜㅜ

 

허접이라............ 알려주시면 감사하겠습니다.

Comment '2'
  • ?
    허걱 2011.09.14 00:13

    def update

    super

    ...

    이렇게 되어있는 부분을 찾아서 아래쪽에

    self.visible = $game_switches[n]

    이라고 추가해 주시기 바랍니다.

     

    n 부분에는 사용할 스위치의 번호를 적어주시면 되고...,

    이렇게 해줄경우 n번 스위치가 ON일 경우만 표시하게 됩니다.

  • ?
    샤르티에 2011.09.14 08:27

    예전에 허걱님께 도움받은 적이 있습니다.

    이번에도 도움받았네요

    님은정말천재입니다............. 감사합니다 ㅎ


List of Articles
종류 분류 제목 글쓴이 날짜 조회 수
공지 묻고 답하기 가이드 습작 2014.06.14 12447
Board Pagination Prev 1 ... 5 Next
/ 5