RMVX

맵상에 하나더 찍혀요

by 명품항룡 posted Aug 16, 2011
?

단축키

Prev이전 문서

Next다음 문서

ESC닫기

크게 작게 위로 아래로 댓글로 가기 인쇄
Extra Form

1.jpg : 맵상에 하나더 찍혀요

이렇게 메뉴에 들어가거나 맵이동을하면 저쪽에 하나더 찍혀서 안없어져요 ;;

 

스크립트로 한거거든요 .. ㅜ

 

---------------------

 

스크립트도 올릴게요

 

---------------------

 

class Game_System < Game_System
  attr_accessor :mini_guage
  def initialize
    super
    @mini_guage = false
  end
end

class Sprite_Character < Sprite_Character
  def update_bitmap
    super
    if !@hpguage.nil?
      @hpguage.dispose
      @hpguage = nil
    end
    if !@mpguage.nil?
      @mpguage.dispose
      @mpguage = nil
    end
    return if $game_system.mini_guage
    if @character == $game_player and $game_party.members.size > 0 and
      $game_player.vehicle_type == -1 and $game_temp.next_scene.nil?
      hpguage = Bitmap.new(32, 3)
      mpguage = Bitmap.new(32, 3)
      hpguage.fill_rect(0,0,hpguage.width,hpguage.height,Color.new(255,0,0,160))
      mpguage.fill_rect(0,0,hpguage.width,hpguage.height,Color.new(0,0,255,160))
      hp = ($game_party.members[0].hp*32)/$game_party.members[0].maxhp
      mp = ($game_party.members[0].mp*32)/$game_party.members[0].maxmp
      vhp = Viewport.new($game_player.screen_x-16,$game_player.screen_y-58, hp,3)
      vmp = Viewport.new($game_player.screen_x-17,$game_player.screen_y-55, mp,3)
      @hpguage = Sprite.new(vhp)
      @mpguage = Sprite.new(vmp)
      @hpguage.bitmap = hpguage
      @mpguage.bitmap = mpguage
    end
  end
end