메뉴 건너뛰기

창조도시 기록보관소

RPGXP [스크립트]게이지바 글자 올리는법좀..

2007.08.01 08:00

하앍하앍~ 조회 수:4413

# HP,SP긒?긙?렑긚긏깏긵긣Ver 꺛
# 봹븓뙰갋긖??긣URL
# http://members.jcom.home.ne.jp/cogwheel/

#==============================================================================
# 걾 Game_Actor
#------------------------------------------------------------------------------
# ?귺긏??귩댌궎긏깋긚궳궥갃궞궻긏깋긚궼 Game_Actors 긏깋긚 ($game_actors)
# 궻볙븫궳럊뾭궠귢갂Game_Party 긏깋긚 ($game_party) 궔귞귖랷뤖궠귢귏궥갃
#==============================================================================

class Game_Actor < Game_Battler
  def now_exp
    return @exp - @exp_list[@level]
  end
  def next_exp
    return @exp_list[@level+1] > 0 ? @exp_list[@level+1] - @exp_list[@level] : 0
  end
end

#==============================================================================
# 걾 Window_Base
#------------------------------------------------------------------------------
# ?긒??뭷궻궥귊궲궻긂귻깛긤긂궻긚?긬?긏깋긚궳궥갃
#==============================================================================

class Window_Base < Window
  #--------------------------------------------------------------------------
  # 걶 HP 긒?긙궻?됪
  #--------------------------------------------------------------------------
  # 긆깏긙긥깑궻HP?됪귩 draw_actor_hp_original 궴뼹멟빾뛛
  alias :draw_actor_hp_original :draw_actor_hp
  def draw_actor_hp(actor, x, y, width = 144)
    # 빾릶rate궸 뙸띪궻HP/MHP귩묆볺
    if actor.maxhp != 0
      rate = actor.hp.to_f / actor.maxhp
    else
      rate = 0
    end
    # plus_x:X띆뷭궻댧뭫뺚맫 rate_x:X띆뷭궻댧뭫뺚맫(%) plus_y:Y띆뷭궻댧뭫뺚맫
    # plus_width:븴궻뺚맫 rate_width:븴궻뺚맫(%) height:뢢븴
    # align1:?됪?귽긵1 0:뜺땗귕 1:뭷돍뫓궑 2:덭땗귕
    # align2:?됪?귽긵2 0:뤵땗귕 1:뭷돍뫓궑 2:돷땗귕
    # align3:긒?긙?귽긵 0:뜺땗귕 1:덭땗귕
    plus_x = 0
    rate_x = 0
    plus_y = 25
    plus_width = 0
    rate_width = 100
    height = 10 # 게이지의 두께

    align1 = 1
    align2 = 2
    align3 = 0
    # 긐깋긢?긘깈깛먠믦 grade1:뗴긒?긙 grade2:렳긒?긙
    # (0:돘궸긐깋긢?긘깈깛 1:뢢궸긐깋긢?긘깈깛 2:롈귕궸긐깋긢?긘깈깛(똽뢣)걂
    grade1 = 1
    grade2 = 0
    # 륡먠믦갃color1:둖쁤갅color2:뭷쁤
    # color3:뗴긒?긙??긏긇깋?갅color4:뗴긒?긙깋귽긣긇깋?
    # color5:렳긒?긙??긏긇깋?갅color6:렳긒?긙깋귽긣긇깋?
    color1 = Color.new(0, 0, 0, 192)
    color2 = Color.new(255, 255, 192, 192)
    color3 = Color.new(0, 0, 0, 192)
    color4 = Color.new(64, 0, 0, 192)
    color5 = Color.new(80 - 24 * rate, 80 * rate, 14 * rate, 192)
    color6 = Color.new(240 - 72 * rate, 240 * rate, 62 * rate, 192)
    # 빾릶sp궸?됪궥귡긒?긙궻븴귩묆볺
    if actor.maxhp != 0
      hp = (width + plus_width) * actor.hp * rate_width / 100 / actor.maxhp
    else
      hp = 0
    end
    # 긒?긙궻?됪
    gauge_rect(x + plus_x + width * rate_x / 100, y + plus_y,
                width, plus_width + width * rate_width / 100,
                height, hp, align1, align2, align3,
                color1, color2, color3, color4, color5, color6, grade1, grade2)
    # 긆깏긙긥깑궻HP?됪룉뿚귩뚁귂뢯궢
    draw_actor_hp_original(actor, x, y, width)
  end
  #--------------------------------------------------------------------------
  # 걶 SP 긒?긙궻?됪
  #--------------------------------------------------------------------------
  # 긆깏긙긥깑궻SP?됪귩 draw_actor_sp_original 궴뼹멟빾뛛
  alias :draw_actor_sp_original :draw_actor_sp
  def draw_actor_sp(actor, x, y, width = 144)
    # 빾릶rate궸 뙸띪궻SP/MSP귩묆볺
    if actor.maxsp != 0
      rate = actor.sp.to_f / actor.maxsp
    else
      rate = 1
    end
    # plus_x:X띆뷭궻댧뭫뺚맫 rate_x:X띆뷭궻댧뭫뺚맫(%) plus_y:Y띆뷭궻댧뭫뺚맫
    # plus_width:븴궻뺚맫 rate_width:븴궻뺚맫(%) height:뢢븴
    # align1:?됪?귽긵1 0:뜺땗귕 1:뭷돍뫓궑 2:덭땗귕
    # align2:?됪?귽긵2 0:뤵땗귕 1:뭷돍뫓궑 2:돷땗귕
    # align3:긒?긙?귽긵 0:뜺땗귕 1:덭땗귕
    plus_x = 0
    rate_x = 0
    plus_y = 25
    plus_width = 0
    rate_width = 100
    height = 10 # 게이지의 두께

    align1 = 1
    align2 = 2
    align3 = 0
    # 긐깋긢?긘깈깛먠믦 grade1:뗴긒?긙 grade2:렳긒?긙
    # (0:돘궸긐깋긢?긘깈깛 1:뢢궸긐깋긢?긘깈깛 2:롈귕궸긐깋긢?긘깈깛(똽뢣)걂
    grade1 = 1
    grade2 = 0
    # 륡먠믦갃color1:둖쁤갅color2:뭷쁤
    # color3:뗴긒?긙??긏긇깋?갅color4:뗴긒?긙깋귽긣긇깋?
    # color5:렳긒?긙??긏긇깋?갅color6:렳긒?긙깋귽긣긇깋?
    color1 = Color.new(0, 0, 0, 192)
    color2 = Color.new(255, 255, 192, 192)
    color3 = Color.new(0, 0, 0, 192)
    color4 = Color.new(0, 64, 0, 192)
    color5 = Color.new(14 * rate, 80 - 24 * rate, 80 * rate, 192)
    color6 = Color.new(62 * rate, 240 - 72 * rate, 240 * rate, 192)
    # 빾릶sp궸?됪궥귡긒?긙궻븴귩묆볺
    if actor.maxsp != 0
      sp = (width + plus_width) * actor.sp * rate_width / 100 / actor.maxsp
    else
      sp = (width + plus_width) * rate_width / 100
    end
    # 긒?긙궻?됪
    gauge_rect(x + plus_x + width * rate_x / 100, y + plus_y,
                width, plus_width + width * rate_width / 100,
                height, sp, align1, align2, align3,
                color1, color2, color3, color4, color5, color6, grade1, grade2)
    # 긆깏긙긥깑궻SP?됪룉뿚귩뚁귂뢯궢
    draw_actor_sp_original(actor, x, y, width)
  end
  #--------------------------------------------------------------------------
  # 걶 EXP 긒?긙궻?됪
  #--------------------------------------------------------------------------
  # 긆깏긙긥깑궻SP?됪귩 draw_actor_sp_original 궴뼹멟빾뛛
  alias :draw_actor_exp_original :draw_actor_exp
  def draw_actor_exp(actor, x, y, width = 204)
    # 빾릶rate궸 뙸띪궻SP/MSP귩묆볺
    if actor.next_exp != 0
      rate = actor.now_exp.to_f / actor.next_exp
    else
      rate = 1
    end
    # plus_x:X띆뷭궻댧뭫뺚맫 rate_x:X띆뷭궻댧뭫뺚맫(%) plus_y:Y띆뷭궻댧뭫뺚맫
    # plus_width:븴궻뺚맫 rate_width:븴궻뺚맫(%) height:뢢븴
    # align1:?됪?귽긵1 0:뜺땗귕 1:뭷돍뫓궑 2:덭땗귕
    # align2:?됪?귽긵2 0:뤵땗귕 1:뭷돍뫓궑 2:돷땗귕
    # align3:긒?긙?귽긵 0:뜺땗귕 1:덭땗귕
    plus_x = 0
    rate_x = 0
    plus_y = 25
    plus_width = 0
    rate_width = 100
    height = 10 # 게이지의 두께

    align1 = 1
    align2 = 2
    align3 = 0
    # 긐깋긢?긘깈깛먠믦 grade1:뗴긒?긙 grade2:렳긒?긙
    # (0:돘궸긐깋긢?긘깈깛 1:뢢궸긐깋긢?긘깈깛 2:롈귕궸긐깋긢?긘깈깛(똽뢣)걂
    grade1 = 1
    grade2 = 0
    # 륡먠믦갃color1:둖쁤갅color2:뭷쁤
    # color3:뗴긒?긙??긏긇깋?갅color4:뗴긒?긙깋귽긣긇깋?
    # color5:렳긒?긙??긏긇깋?갅color6:렳긒?긙깋귽긣긇깋?
    color1 = Color.new(0, 0, 0, 192)
    color2 = Color.new(255, 255, 192, 192)
    color3 = Color.new(0, 0, 0, 192)
    color4 = Color.new(64, 0, 0, 192)
    color5 = Color.new(80 * rate, 80 - 80 * rate ** 2, 80 - 80 * rate, 192)
    color6 = Color.new(240 * rate, 240 - 240 * rate ** 2, 240 - 240 * rate, 192)
    # 빾릶sp궸?됪궥귡긒?긙궻븴귩묆볺
    if actor.next_exp != 0
      exp = (width + plus_width) * actor.now_exp * rate_width /
                                                          100 / actor.next_exp
    else
      exp = (width + plus_width) * rate_width / 100
    end
    # 긒?긙궻?됪
    gauge_rect(x + plus_x + width * rate_x / 100, y + plus_y,
                width, plus_width + width * rate_width / 100,
                height, exp, align1, align2, align3,
                color1, color2, color3, color4, color5, color6, grade1, grade2)
    # 긆깏긙긥깑궻SP?됪룉뿚귩뚁귂뢯궢
    draw_actor_exp_original(actor, x, y)
  end
  #--------------------------------------------------------------------------
  # 걶 긒?긙궻?됪
  #--------------------------------------------------------------------------
  def gauge_rect(x, y, rect_width, width, height, gauge, align1, align2, align3,
                color1, color2, color3, color4, color5, color6, grade1, grade2)
    case align1
    when 1
      x += (rect_width - width) / 2
    when 2
      x += rect_width - width
    end
    case align2
    when 1
      y -= height / 2
    when 2
      y -= height
    end
    # 쁤?됪
    self.contents.fill_rect(x, y, width, height, color1)
    self.contents.fill_rect(x + 1, y + 1, width - 2, height - 2, color2)
    if align3 == 0
      if grade1 == 2
        grade1 = 3
      end
      if grade2 == 2
        grade2 = 3
      end
    end
    if (align3 == 1 and grade1 == 0) or grade1 > 0
      color = color3
      color3 = color4
      color4 = color
    end
    if (align3 == 1 and grade2 == 0) or grade2 > 0
      color = color5
      color5 = color6
      color6 = color
    end
    # 뗴긒?긙궻?됪 뢢궸긐깋긢?긘깈깛?렑
    self.contents.gradation_rect(x + 2, y + 2, width - 4, height - 4,
                                  color3, color4, grade1)
    if align3 == 1
      x += width - gauge
    end
    # HP긒?긙궻?됪
    self.contents.gradation_rect(x + 2, y + 2, gauge - 4, height - 4,
                                  color5, color6, grade2)
  end
end

#------------------------------------------------------------------------------
# ?Bitmap긏깋긚궸륷궫궶??귩믁돿궢귏궥갃
#==============================================================================

class Bitmap
  #--------------------------------------------------------------------------
  # 걶 뗩?귩긐깋긢?긘깈깛?렑
  #     color1 : 긚??긣긇깋?
  #     color2 : 긄깛긤긇깋?
  #     align  :  0:돘궸긐깋긢?긘깈깛
  #               1:뢢궸긐깋긢?긘깈깛
  #               2:롈귕궸긐깋긢?긘깈깛걁똽뢣궸궰궖뭾댰걂
  #--------------------------------------------------------------------------
  def gradation_rect(x, y, width, height, color1, color2, align = 0)
    if align == 0
      for i in x...x + width
        red   = color1.red + (color2.red - color1.red) * (i - x) / (width - 1)
        green = color1.green +
                (color2.green - color1.green) * (i - x) / (width - 1)
        blue  = color1.blue +
                (color2.blue - color1.blue) * (i - x) / (width - 1)
        alpha = color1.alpha +
                (color2.alpha - color1.alpha) * (i - x) / (width - 1)
        color = Color.new(red, green, blue, alpha)
        fill_rect(i, y, 1, height, color)
      end
    elsif align == 1
      for i in y...y + height
        red   = color1.red +
                (color2.red - color1.red) * (i - y) / (height - 1)
        green = color1.green +
                (color2.green - color1.green) * (i - y) / (height - 1)
        blue  = color1.blue +
                (color2.blue - color1.blue) * (i - y) / (height - 1)
        alpha = color1.alpha +
                (color2.alpha - color1.alpha) * (i - y) / (height - 1)
        color = Color.new(red, green, blue, alpha)
        fill_rect(x, i, width, 1, color)
      end
    elsif align == 2
      for i in x...x + width
        for j in y...y + height
          red   = color1.red + (color2.red - color1.red) *
                  ((i - x) / (width - 1.0) + (j - y) / (height - 1.0)) / 2
          green = color1.green + (color2.green - color1.green) *
                  ((i - x) / (width - 1.0) + (j - y) / (height - 1.0)) / 2
          blue  = color1.blue + (color2.blue - color1.blue) *
                  ((i - x) / (width - 1.0) + (j - y) / (height - 1.0)) / 2
          alpha = color1.alpha + (color2.alpha - color1.alpha) *
                  ((i - x) / (width - 1.0) + (j - y) / (height - 1.0)) / 2
          color = Color.new(red, green, blue, alpha)
          set_pixel(i, j, color)
        end
      end
    elsif align == 3
      for i in x...x + width
        for j in y...y + height
          red   = color1.red + (color2.red - color1.red) *
                ((x + width - i) / (width - 1.0) + (j - y) / (height - 1.0)) / 2
          green = color1.green + (color2.green - color1.green) *
                ((x + width - i) / (width - 1.0) + (j - y) / (height - 1.0)) / 2
          blue  = color1.blue + (color2.blue - color1.blue) *
                ((x + width - i) / (width - 1.0) + (j - y) / (height - 1.0)) / 2
          alpha = color1.alpha + (color2.alpha - color1.alpha) *
                ((x + width - i) / (width - 1.0) + (j - y) / (height - 1.0)) / 2
          color = Color.new(red, green, blue, alpha)
          set_pixel(i, j, color)
        end
      end
    end
  end
end

#==============================================================================
# 걾 Sprite긾긙깄?깑
#------------------------------------------------------------------------------
# ?귺긦긽?긘깈깛궻듖뿚귩뛱궎긾긙깄?깑궳궥갃
#==============================================================================

module RPG
  class Sprite < ::Sprite
    def damage(value, critical)
      dispose_damage
      if value.is_a?(Numeric)
        damage_string = value.abs.to_s
      else
        damage_string = value.to_s
      end
      bitmap = Bitmap.new(160, 48)
      bitmap.font.name = "Arial Black"
      bitmap.font.size = 32
      bitmap.font.color.set(0, 0, 0)
      bitmap.draw_text(-1, 12-1, 160, 36, damage_string, 1)
      bitmap.draw_text(+1, 12-1, 160, 36, damage_string, 1)
      bitmap.draw_text(-1, 12+1, 160, 36, damage_string, 1)
      bitmap.draw_text(+1, 12+1, 160, 36, damage_string, 1)
      if value.is_a?(Numeric) and value < 0
        bitmap.font.color.set(176, 255, 144)
      else
        bitmap.font.color.set(255, 255, 255)
      end
      bitmap.draw_text(0, 12, 160, 36, damage_string, 1)
      if critical
        bitmap.font.size = 20
        bitmap.font.color.set(0, 0, 0)
        bitmap.draw_text(-1, -1, 160, 20, "CRITICAL", 1)
        bitmap.draw_text(+1, -1, 160, 20, "CRITICAL", 1)
        bitmap.draw_text(-1, +1, 160, 20, "CRITICAL", 1)
        bitmap.draw_text(+1, +1, 160, 20, "CRITICAL", 1)
        bitmap.font.color.set(255, 255, 255)
        bitmap.draw_text(0, 0, 160, 20, "CRITICAL", 1)
      end
      @_damage_sprite = ::Sprite.new
      @_damage_sprite.bitmap = bitmap
      @_damage_sprite.ox = 80 + self.viewport.ox
      @_damage_sprite.oy = 20 + self.viewport.oy
      @_damage_sprite.x = self.x + self.viewport.rect.x
      @_damage_sprite.y = self.y - self.oy / 2 + self.viewport.rect.y
      @_damage_sprite.z = 3000
      @_damage_duration = 40
    end
    def animation(animation, hit)
      dispose_animation
      @_animation = animation
      return if @_animation == nil
      @_animation_hit = hit
      @_animation_duration = @_animation.frame_max
      animation_name = @_animation.animation_name
      animation_hue = @_animation.animation_hue
      bitmap = RPG::Cache.animation(animation_name, animation_hue)
      if @@_reference_count.include?(bitmap)
        @@_reference_count[bitmap] += 1
      else
        @@_reference_count[bitmap] = 1
      end
      @_animation_sprites = []
      if @_animation.position != 3 or not @@_animations.include?(animation)
        for i in 0..15
          sprite = ::Sprite.new
          sprite.bitmap = bitmap
          sprite.visible = false
          @_animation_sprites.push(sprite)
        end
        unless @@_animations.include?(animation)
          @@_animations.push(animation)
        end
      end
      update_animation
    end
    def loop_animation(animation)
      return if animation == @_loop_animation
      dispose_loop_animation
      @_loop_animation = animation
      return if @_loop_animation == nil
      @_loop_animation_index = 0
      animation_name = @_loop_animation.animation_name
      animation_hue = @_loop_animation.animation_hue
      bitmap = RPG::Cache.animation(animation_name, animation_hue)
      if @@_reference_count.include?(bitmap)
        @@_reference_count[bitmap] += 1
      else
        @@_reference_count[bitmap] = 1
      end
      @_loop_animation_sprites = []
      for i in 0..15
        sprite = ::Sprite.new
        sprite.bitmap = bitmap
        sprite.visible = false
        @_loop_animation_sprites.push(sprite)
      end
      update_loop_animation
    end
    def animation_set_sprites(sprites, cell_data, position)
      for i in 0..15
        sprite = sprites[i]
        pattern = cell_data[i, 0]
        if sprite == nil or pattern == nil or pattern == -1
          sprite.visible = false if sprite != nil
          next
        end
        sprite.visible = true
        sprite.src_rect.set(pattern % 5 * 192, pattern / 5 * 192, 192, 192)
        if position == 3
          if self.viewport != nil
            sprite.x = self.viewport.rect.width / 2
            sprite.y = self.viewport.rect.height - 160
          else
            sprite.x = 320
            sprite.y = 240
          end
        else
          sprite.x = self.x + self.viewport.rect.x -
                      self.ox + self.src_rect.width / 2
          sprite.y = self.y + self.viewport.rect.y -
                      self.oy + self.src_rect.height / 2
          sprite.y -= self.src_rect.height / 4 if position == 0
          sprite.y += self.src_rect.height / 4 if position == 2
        end
        sprite.x += cell_data[i, 1]
        sprite.y += cell_data[i, 2]
        sprite.z = 2000
        sprite.ox = 96
        sprite.oy = 96
        sprite.zoom_x = cell_data[i, 3] / 100.0
        sprite.zoom_y = cell_data[i, 3] / 100.0
        sprite.angle = cell_data[i, 4]
        sprite.mirror = (cell_data[i, 5] == 1)
        sprite.opacity = cell_data[i, 6] * self.opacity / 255.0
        sprite.blend_type = cell_data[i, 7]
      end
    end
  end
end


일단멈춤일단멈춤일단멈춤일단멈춤일단멈춤일단멈춤일단멈춤일단멈춤일단멈춤일단멈춤일단멈춤일단멈춤일단멈춤일단멈춤일단멈춤일단멈춤일단멈춤일단멈춤일단멈춤일단멈춤일단멈춤일단멈춤일단멈춤일단멈춤일단멈춤일단멈춤일단멈춤일단멈춤일단멈춤일단멈춤일단멈춤일단멈춤일단멈춤일단멈춤일단멈춤일단멈춤일단멈춤일단멈춤일단멈춤일단멈춤일단멈춤일단멈춤일단멈춤일단멈춤일단멈춤일단멈춤일단멈춤일단멈춤일단멈춤일단멈춤일단멈춤일단멈춤일단멈춤일단멈춤일단멈춤일단멈춤일단멈춤일단멈춤일단멈춤일단멈춤일단멈춤일단멈춤일단멈춤일단멈춤일단멈춤일단멈춤일단멈춤일단멈춤일단멈춤일단멈춤일단멈춤일단멈춤일단멈춤일단멈춤일단멈춤일단멈춤일단멈춤일단멈춤일단멈춤일단멈춤일단멈춤일단멈춤일단멈춤일단멈춤일단멈춤일단멈춤일단멈춤일단멈춤일단멈춤일단멈춤일단멈춤일단멈춤일단멈춤일단멈춤일단멈춤일단멈춤일단멈춤일단멈춤일단멈춤일단멈춤일단멈춤일단멈춤일단멈춤일단멈춤일단멈춤일단멈춤일단멈춤일단멈춤일단멈춤일단멈춤일단멈춤일단멈춤일단멈춤일단멈춤일단멈춤일단멈춤일단멈춤일단멈춤일단멈춤



그리고, 또 새로 다음 스크립트를 추가하세요.


#==============================================================================
# ■ Game_Actor
#------------------------------------------------------------------------------
#  엑터를 취급하는 클래스입니다. 이 클래스는 Game_Actors 클래스 ($game_actors)
# 의 내부에서 사용되어 Game_Party 클래스 ($game_party)로부터도 참조됩니다.
#==============================================================================

class Game_Actor < Game_Battler
  attr_reader   :exp_list
end
#==============================================================================
# ■ Window_Map_Name
#------------------------------------------------------------------------------
#  マップ名を表示するウィンドウです。
#==============================================================================
class Window_MapGauge < Window_Base
  attr_accessor :actor
  #--------------------------------------------------------------------------
  # ● オブジェクト初期
  #--------------------------------------------------------------------------
  def initialize
    super(0, 0, 204, 224)
    self.contents = Bitmap.new(width - 32, height - 32)
  end
  
  def set_actor(actor)
    # hp, sp, exp 중 하나라도 변화가 있을 때 업데이트.
    if @actor == nil
      @actor = actor.clone
      self.contents.clear
      draw_actor_class(@actor, 32, 32) #엑터의 클래스를 나타내는 부분, 좌표 x32, y32
      draw_actor_level(@actor, 96, 32) #엑터의 레벨을 나타내는 부분, 좌표 x96, y32
      draw_actor_name(@actor, 4, 0)
      draw_actor_hp(@actor, 0, 64, 172)
      draw_actor_sp(@actor, 0, 96, 172)
      draw_actor_exp(@actor, 0, 128)    
    elsif  actor.hp != @actor.hp or actor.sp != @actor.sp or actor.exp != @actor.exp
      #p "actor.hp", actor.hp,    "@actor.hp", @actor.hp
      @actor = actor.clone
      self.contents.clear
      draw_actor_class(@actor, 32, 32)
      draw_actor_level(@actor, 96, 32)
      draw_actor_name(@actor, 4, 0)
      draw_actor_hp(@actor, 0, 64, 172)
      draw_actor_sp(@actor, 0, 96, 172)
      draw_actor_exp(@actor, 0, 128)    
    end #파라메터가 모두 같을 경우 업데이트 하지 않음으로서 속도를 빠르게 해준다.
  end
end


#==============================================================================
# ■ Scene_Map
#==============================================================================
class Scene_Map
  #--------------------------------------------------------------------------
  # ● メイン?理
  #--------------------------------------------------------------------------
alias thdo_main main
  alias thdo_initialize initialize
  def initialize
    @actor_index = 0
    thdo_initialize
  end
  def main
    # 地名ウィンドウを作成
    @mapgaugewindow = Window_MapGauge.new
    @mapgaugewindow.opacity = 0
    # ?す
    thdo_main
    # 地名ウィンドウを解放
    @mapgaugewindow.dispose
  end
  #--------------------------------------------------------------------------
  # ● 프레임 갱신
  #--------------------------------------------------------------------------
  def update
    # 루프
    @mapgaugewindow.set_actor($game_party.actors[@actor_index])
    loop do
      # 맵, interpreter, 플레이어의 순서에 갱신
      # (이 갱신 순서는, 이벤트를 실행하는 조건이 채워지고 있을 때
      #  플레이어에 일순간 이동할 기회를 주지 않는등의 이유로써 중요)
      $game_map.update
      $game_system.map_interpreter.update
      $game_player.update
      # 시스템 (타이머), 화면을 갱신
      $game_system.update
      $game_screen.update
      # 플레이어의 장소 이동중이 아니면 루프를 중단
      unless $game_temp.player_transferring
        break
      end
      # 장소 이동을 실행
      transfer_player
      # 트란지션 처리중의 경우, 루프를 중단
      if $game_temp.transition_processing
        break
      end
    end
    # 스프라이트 세트를 갱신
    @spriteset.update
    # 메세지 윈도우를 갱신
    @message_window.update
    # 게임 오버의 경우
    if $game_temp.gameover
      # 게임 오버 화면으로 전환하고
      $scene = Scene_Gameover.new
      return
    end
    # 타이틀 화면에 되돌리는 경우
    if $game_temp.to_title
      # 타이틀 화면으로 전환하고
      $scene = Scene_Title.new
      return
    end
    # 트란지션 처리중의 경우
    if $game_temp.transition_processing
      # 트란지션 처리중 플래그를 클리어
      $game_temp.transition_processing = false
      # 트란지션 실행
      if $game_temp.transition_name == ""
        Graphics.transition(20)
      else
        Graphics.transition(40, "Graphics/Transitions/" +
          $game_temp.transition_name)
      end
    end
    # 메세지 윈도우 표시중의 경우
    if $game_temp.message_window_showing
      return
    end
    # 엔카운트카운트가 0 으로, 엔카운트리스트가 하늘이 아닌 경우
    if $game_player.encounter_count == 0 and $game_map.encounter_list != []
      # 이벤트 실행중이나 엔카운트 금지중이 아니면
      unless $game_system.map_interpreter.running?  or
             $game_system.encounter_disabled
        # 배틀 호출 플래그를 세트
        $game_temp.battle_calling = true
        $game_temp.battle_can_escape = true
        $game_temp.battle_can_lose = false
        $game_temp.battle_proc = nil
        # 무리를 결정
        n = rand($game_map.encounter_list.size)
        $game_temp.battle_troop_id = $game_map.encounter_list[n]
      end
    end
        
    #다음 엑터에게
    if Input.trigger? (Input::R)
            unless $game_system.map_interpreter.running?  or
             $game_system.menu_disabled
      @actor_index += 1
      @actor_index %= $game_party.actors.size
      @mapgaugewindow.set_actor($game_party.actors[@actor_index])
      end
    end
    #전의 엑터에게
    if Input.trigger? (Input::L)
            unless $game_system.map_interpreter.running?  or
             $game_system.menu_disabled
      @actor_index += $game_party.actors.size - 1
      @actor_index %= $game_party.actors.size
      @mapgaugewindow.set_actor($game_party.actors[@actor_index])
      end
    end
#THDO스크립트 종료
    # B 버튼이 밀렸을 경우
    if Input.trigger? (Input::B)
      # 이벤트 실행중이나 메뉴 금지중이 아니면
      unless $game_system.map_interpreter.running?  or
             $game_system.menu_disabled
        # 메뉴 호출 플래그와 SE 연주 플래그를 세트
        $game_temp.menu_calling = true
        $game_temp.menu_beep = true
      end
    end
    # 디버그 모드가 ON 또한 F9 키가 밀리고 있는 경우
    if $DEBUG and Input.press? (Input::F9)
      # 디버그 호출 플래그를 세트
      $game_temp.debug_calling = true
    end
    # 플레이어의 이동중이 아닌 경우
    unless $game_player.moving?
      # 각종 화면의 호출을 실행
      if $game_temp.battle_calling
        call_battle
      elsif $game_temp.shop_calling
        call_shop
      elsif $game_temp.name_calling
        call_name
      elsif $game_temp.menu_calling
        call_menu
      elsif $game_temp.save_calling
        call_save
      elsif $game_temp.debug_calling
        call_debug
      end
    end
  end
end


 


 


위의 스크립은 HP,SP,EXP 게이지바를 나타내는건데요..


 


제가 스크립트 왕초보라서요 ;ㅁ;


 


게이지의 위치를 Y좌표로 올리는건 알겠는데


 


옴기고 나면 HP,SP,EXP 라는 글씨들은 그대로 있거든요...??


 


이것도 Y좌표로 올리는 방법좀 알려주세요~!!

번호 제목 글쓴이 날짜 조회 수
379 RPG XP 를 받긴 했습니다만... 『덩키동크』 2007.12.10 282
378 RPG XP 를 받긴 했습니다만... 류현 2007.12.10 539
377 생초보- 맵 연결 (장소 이동) 질문. 『덩키동크』 2007.12.01 69
376 생초보- 맵 연결 (장소 이동) 질문. eclipse 2007.12.01 383
375 마우스 관련 답변 부탁드립니다. [1] 울스M 2007.10.29 342
374 좌표구하기에 관한 질문입니다. 『덩키동크』 2007.10.14 61
373 좌표구하기에 관한 질문입니다. contect 2007.10.11 373
372 RPG XP 조작키 변경에 대해 가르쳐주세요 반데드 2007.10.02 255
371 RPG XP 조작키 변경에 대해 가르쳐주세요 유진 2007.09.20 522
370 RPG XP 조작키 변경에 대해 가르쳐주세요 [1] Raview 2007.09.19 617
369 RXP데미지계산 문제가 있어요!!! 리스티온 2007.09.09 319
368 애니메이션 제작 [1] 『덩키동크』 2007.08.15 103
367 애니메이션 제작 [2] 속박의사슬 2007.08.13 436
366 sp를 회복하는 스킬을 만드는 법 yakanhikou 2007.08.11 364
365 퀘스트목록 만들기 [2] 자크 2007.08.08 628
364 스크립트로 커먼 이벤트 실행하는법? [3] PENJi 2007.08.05 489
» [스크립트]게이지바 글자 올리는법좀.. [2] 하앍하앍~ 2007.08.01 4413
362 XP에선 문장의표시에서 글자색이나 글자속도를.. 하앍하앍~ 2007.07.31 231
361 아이템의 타입을 새로 정의하고 싶은데요. PENJi 2007.07.30 359
360 고정되어있는 이벤트 움직이는 모션 설정하기 나카리 2007.07.29 126