VX 스크립트

Game 2013-09-30 14-29-49-751.jpg

개조 사항 : 아이템 관련을 모두 주석화 시킴
              : 크기를 줄임
              : 게이지 바 위치를 조정

※ 만약 실행이 안되면 첨부파일에 있는 텍스트 문서로 받아주세요.
※ 실험 결과, 스위치가 켜진 후 메뉴에 한번 들어가면 적용됩니다.



################################################################################
#                                                                              #
#                      ~~~~~ Copyright 2009 SojaBird ~~~~~                     #
#                                                                              #
################################################################################
module HUD_ITEM_HP_MP
  HUD_SWITCH = 1 # Turn this ON to show HUD
  
#~   ITEM_ID = 0 # Id of item to show
  ACTOR_ID = 0 # Id of actor to show hp/mp (actor1=0, actor2=1...actorN=N-1)
  
  HIDE = true # Hide if player is beneath the hud (true/false)
  OPACITY = 100 # Opacity when hidden
end
################################################################################
class Window_HUD_Item_HP_MP < Window_Base
  include HUD_ITEM_HP_MP
  
  def initialize
    super(0, 0, 90, 85)
    self.opacity = OPACITY
    self.visible = $game_switches[HUD_SWITCH]
    hide_status
    refresh
  end
  
  def refresh
    contents.clear
    @actor = $game_party.members[ACTOR_ID]
    @hp = @actor.hp
    @mp = @actor.mp
#~     @item = $game_party.item_number($data_items[ITEM_ID])
#~     item_icon = $data_items[ITEM_ID].icon_index
#~     draw_icon(item_icon, 0, 0)
#~     contents.draw_text(1, 0, contents.width - 24, WLH, @item, 2)
    draw_actor_hp(@actor, 0, 0, self.width - 32)
    draw_actor_mp(@actor, 0, 24, self.width - 32)
  end
  
  def hide_status
    if HIDE == true
      if $game_player.screen_x + 16 > self.x and
      $game_player.screen_y + 4 > self.y and
      $game_player.screen_x - 16 < self.x + self.width and
      $game_player.screen_y - 28 < self.y + self.height
        self.opacity = OPACITY
        self.contents_opacity = OPACITY
      else
        self.opacity = 255
        self.contents_opacity = 255
      end
    end
  end
  
  def update
    self.visible = $game_switches[HUD_SWITCH]
    return if !self.visible
#~     if @icon != $game_party.item_number($data_items[ITEM_ID]) or
      if #hp != @actor.hp or @mp != @actor.mp
      refresh
    end
  end
#~ end

#------------------------------------------------------------
# * Scene_Map: Attach HUD to map
#------------------------------------------------------------
class Scene_Map < Scene_Base
  alias start_hud start
  alias terminate_hud terminate
  alias update_hud update
  def start
    start_hud
    @item_hp_mp_hud = Window_HUD_Item_HP_MP.new
  end
  def terminate
    @item_hp_mp_hud.dispose
    terminate_hud
  end
  def update
    update_hud
    @item_hp_mp_hud.update
  end
end

Who's 스리아씨

?
뺘라뺘뺘
Comment '7'
  • profile
    카온 2013.09.30 16:56
    엇 감사합니다 정말로 제작 해주셨군요 ㅠ
    그런데 메뉴에 한번 갔다와야 적용이 됀다는게
    스위치가 켜지고 나서 메뉴를 꼭 들어가야 박스가 보이는건가요?
  • ?
    스리아씨 2013.09.30 17:12
    제가 실험하기엔 그러더군요(...)
  • profile
    카온 2013.09.30 17:17
    엌ㅋㅋ... 강제로 메뉴를 트는 이벤트라도 넣어야할까나요ㅋㅋ
  • ?
    카온님 축하합니다.^^ 2013.09.30 17:17
    포인트 팡팡!에 당첨되셨습니다.
    카온님은 3포인트를 보너스로 받으셨습니다.
  • ?
    AltusZeon 2014.01.17 00:43
    #~ if @icon != $game_party.item_number($data_items[ITEM_ID]) or
    @hp != @actor.hp or @mp != @actor.mp
    refresh
    end
    end
    #~ end

    이부분 주석처리를 좀 이상하게 하셨군요.

    #~ if @icon != $game_party.item_number($data_items[ITEM_ID]) or
    if @hp != @actor.hp or @mp != @actor.mp
    refresh
    end
    end
    end

    이렇게 해주셔야 합니다.
  • ?
    skeskin 2014.02.17 16:08
    잘쓸게요~@@@
  • ?
    sakuragi 2014.08.05 20:23
    저기 죄송한테 파티 전원 HP/MP 출력되는건 없나요?

List of Articles
번호 분류 제목 글쓴이 날짜 조회 수
공지 스크립트 자료 게시물 작성시 주의사항 3 습작 2012.12.24 5398
637 ((대박!)) 게임상의 모든 글자에 효과 주기.. 33 미카엘 2008.08.20 5582
636 (?스크립트) 스크립트 읽어서 그래픽 넣으세요.(영어 잘하는 사람만 권장...) 2 Man... 2008.10.27 1444
635 메뉴 (모그메뉴 풀세트팩 SEL Style.) 유니크급 자료 147 file 할렘 2009.02.07 9558
634 상점 (수정)크리쳐 샵, 'SW_CreatureShop' by Siot Warrior 15 file 시옷전사 2010.09.03 3675
633 액터 (수정)크리쳐 합체, 'SW_CreatureMix' by SiotWarrior 22 file 시옷전사 2010.09.07 2972
632 기타 (이거 정말 좋군요) 말이나 용을 탈수있게 하는 스크립트. 31 file 아방스가 짱 2010.02.28 4261
631 기타 (좀 이상한 or 쓸모없을 듯 한)화면상에 몬스터와 만나려면 몇걸음 남았는지 표시하는 스크립트! 2 루시페르 2009.06.06 2318
630 기타 078656577er님의 스크립트를 개조한, 사격용 스크립트 1 file 타코 2012.03.16 2519
629 기타 2 Players Engine 11 레이니케 2008.03.28 2294
628 2 Players Engine 2인용하기 15 file RPGbooster 2008.10.08 3999
627 전투 2003식 사이드뷰 적들도 가까이와서 공격함 ㅇㅇ 51 배군 2008.05.02 6750
626 이동 및 탈것 2D 횡스크롤 스크립트 56 file 사람이라면? 2010.08.15 7570
625 이동 및 탈것 3D 던젼 스크립트 38 아방스 2010.12.06 5772
624 그래픽 3D그래픽 파티클엔진 45 file RPGbooster 2008.10.08 10130
623 파티 5인 파티 프로젝트 V1.1 4 file 지나가는떡꼬치 2012.06.30 2988
622 이동 및 탈것 8 방향 이동스크립트 + 스프라이트 효과 12 file 레오 2009.02.06 7557
621 기타 <중수이상>RPG VX의 대표적 참조값 6 까까까 2009.05.31 3236
620 영상 ??(Avi play ver beta 0.8) 4 Man... 2008.10.28 1575
619 ??(다 영어)여기서 부터 드레그만 빼고 Man... 2008.10.27 1078
618 ??? 1 Man... 2008.10.27 1020
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