RPGXP 스크립트
2013.09.24 08:08

경험치 표시 스크립트

조회 수 752 추천 수 0 댓글 0
?

단축키

Prev이전 문서

Next다음 문서

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

단축키

Prev이전 문서

Next다음 문서

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

class Game_Actor < Game_Battler 
  def exp_rate 
    if @exp_list[@level+1] - @exp_list[@level] > 0 
      return (@exp - @exp_list[@level]).to_f / (@exp_list[@level+1] - @exp_list[@level]).to_f 
    else 
      return 0 
    end 
  end 
end 
class Window_ExpRate < Window_Base 
  def initialize 
    super(0, 0, 125, 55) # <- location, size 
    self.contents = Bitmap.new(width - 32, height - 32) 
    
    self.contents.font = Font.new("궁서체", 16) # <- font, size 
    self.opacity = 0 
self.back_opacity = 0 
  end 
  def refresh 
    self.contents.clear 
    self.contents.draw_text(0, 0, 100, 30, @show_text) 
  end 
  def actor 
    $game_party.actors[0] # <- 파티 0번째 
  end 
  def update 
    super 
    text = sprintf("경험치: %d%%", (actor.exp_rate * 100).to_i) 
    if @show_text != text 
      @show_text = text 
      refresh 
    end 
  end 
end 
class Scene_Map 
  alias update_before_map update 
  def update 
    update_before_map 
    @window_exp = Window_ExpRate.new unless @window_exp 
    @window_exp.update 
    unless $scene.is_a?(Scene_Map) 
      @window_exp.dispose 
      @window_exp = nil 
    end 
  end 
end 


출처: 게임공작소

?

List of Articles
번호 분류 제목 글쓴이 날짜 조회 수 추천 수
140 RPGXP 스크립트 선택 메뉴를 가운데 정렬 해보자. 1 file 창조도시 2007.12.02 1959 2
139 RPGXP 스크립트 2D 마인크래프트 프로젝트 7 2013.09.26 3054 2
138 RPGXP 스크립트 퀘스트 스크립트 21  운 2013.10.12 3104 2
137 RPGXP 스크립트 메뉴에 퀘스트 있는거 2  운 2013.10.12 1965 2
136 RPGXP 스크립트 3D스크립트!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 6 공박사 2014.01.18 2809 2
135 RPGXP 스크립트 달리기스크립트 4 천둥번들 2014.02.22 2315 2
134 RPGXP 스크립트 새로운 게임 시작/로드 시 미묘한 연출 추가. 창조도시 2007.12.01 2300 1
133 RPGXP 스크립트 대각선 방향 이동추가로 8방향 이동 만들기. 1 창조도시 2008.08.14 2217 1
132 RPGXP 스크립트 맵 이름을 화면 상단에 띄우기. 1 1 file 창조도시 2008.10.12 2084 1
131 RPGXP 스크립트 아이템창을 아이템 분류별로 나누어 지게 개조. 3 file 창조도시 2007.12.02 1643 1
130 RPGXP 스크립트 c[n] 명령어 줄때의 색상 결정. 창조도시 2008.02.14 1019 1
129 RPGXP 스크립트 대화창에 얼굴 띄우기& 대화창 명령어 모음. 1 file 창조도시 2008.12.31 2091 1
128 RPGXP 스크립트 게임도중에 글씨체를 바꿔보자. 창조도시 2008.12.31 1268 1
127 RPGXP 스크립트 그림자문자 사용하기.. 바탕색이 무슨색이건 상관없이 글자가 잘보인다!!! 창조도시 2007.11.06 1476 1
126 RPGXP 스크립트 파티 선두 캐릭터 id 변수에 넣기 Evangelista 2008.01.08 1389 1
125 RPGXP 스크립트 퀘스트스크립트 2 1 file A.M.S 2010.10.24 2511 1
124 RPGXP 스크립트 새로운 턴형식(사이드뷰비슷한...) 1 file A.M.S 2010.10.14 2475 1
123 RPGXP 스크립트 [무한응용]스위치/변수 임시 저장/로딩하기 1 카리스 2010.04.10 2595 1
122 RPGXP 스크립트 퀘스트스크립트 2 file A.M.S 2010.10.24 2638 1
121 RPGXP 스크립트 파티 선두 캐릭터 id 변수에 넣기 Evangelista 2008.01.08 1787 1
Board Pagination Prev 1 2 3 4 5 6 7 8 Next
/ 8






[개인정보취급방침] | [이용약관] | [제휴문의] | [후원창구] | [인디사이드연혁]

Copyright © 1999 - 2016 INdiSide.com/(주)씨엘쓰리디 All Rights Reserved.
인디사이드 운영자 : 천무(이지선) | kernys(김원배) | 사신지(김병국)