XP 스크립트

흠..메인위에 넣으시고요
오류날시에는 코멘트(리플) 달아주세요^^


# ▼▲▼ XRXS20. 맵명 표시 윈도우 ver.1.04 ▼▲▼
# by , 앵아 재흙, fukuyama
#
# 맵명의 선두에 피리어드 「.」이 있으면(자) 맵명을 표시하지 않는다.
#
module XRXS20_Config
# true (이)라면 전투후 , 맵으로 돌아왔을 경우도 표시한다
SCENE_BATTLE_TO_SCENE_MAP = true
end

#==============================================================================
# ■ Window_Map_Name
#------------------------------------------------------------------------------
#  맵명을 표시하는 윈도우입니다.
#==============================================================================
class Window_Map_Name < Window_Base
attr_accessor :text

#--------------------------------------------------------------------------
# ● 오브젝트 초기
#--------------------------------------------------------------------------
def initialize
super(8, -8, 640, 64)
self.contents = Bitmap.new(self.width - 32, self.height - 32)
@align = 2
@showing_time = -1
@text_color = Color.new(255, 255, 0, 255) # 지명:묘사 문자색
end
#--------------------------------------------------------------------------
# ● 텍스트 설정
# text : 윈도우에 표시하는 캐릭터 라인
# align : alignment (0..왼쪽 가지런히 해1..centering ,2..오른쪽맞춤)
#--------------------------------------------------------------------------
def set_text(text, align = 2)
# 텍스트와 alignment의 적어도 한편이 전회와 다른 경우
if text != @text or align != @align
@text = text
@align = align
if text.empty? or text =~ /^./
@showing_time = -1
self.contents_opacity = 0
self.visible = false
else
@showing_time = 100
self.contents_opacity = 255
self.visible = true
self.contents.clear
x = 4
y = 0
width = self.contents.width - 8
str = "-"+@text+"-"
self.contents.font.color = Color.new( 0, 0, 0, 192)
self.contents.draw_text(x+2, y+2, width, 32, str, @align)
self.contents.font.color = Color.new( 64, 64, 64, 192)
self.contents.draw_text(x-1, y-1, width, 32, str, @align)
self.contents.draw_text(x+1, y-1, width, 32, str, @align)
self.contents.draw_text(x-1, y+1, width, 32, str, @align)
self.contents.draw_text(x+1, y+1, width, 32, str, @align)
self.contents.font.color = @text_color
self.contents.draw_text(x, y, width, 32, str, @align)
end
end
end
#--------------------------------------------------------------------------
# ● 재묘화
#--------------------------------------------------------------------------
def update
return if @showing_time < 0
@showing_time -= 1
if @showing_time < 16
# 페이드아웃 하기 시작하는
self.contents_opacity = @showing_time * 16
if @showing_time == 0
self.visible = false
self.contents.clear
return
end
end
#이 부분을 지워주면 맵 이름이 사라지지 않습니다.
end
end
#==============================================================================
# ■ Scene_Map
#==============================================================================
class Scene_Map
def initialize_map_name_window(text = nil)
if @map_name_window.nil?
@map_name_window = Window_Map_Name.new
@map_name_window.opacity = 0
@map_name_window.text = text if not text.nil?
end
end
#--------------------------------------------------------------------------
# ● 메인 처리
#--------------------------------------------------------------------------
alias xrxs20_main main
def main
# 지명 윈도우를 작성
initialize_map_name_window
# 되돌리는
xrxs20_main
# 지명 윈도우를 해방
@map_name_window.dispose
end
#--------------------------------------------------------------------------
# ● 프레임 갱신
#--------------------------------------------------------------------------
alias xrxs20_update update
def update
# 지명 윈도우의 갱신
@map_name_window.set_text($game_map.name)
@map_name_window.update
xrxs20_update
end
end
#==============================================================================
# ■ Game_Map
#==============================================================================
class Game_Map
#--------------------------------------------------------------------------
# ● 맵명을 취득
#--------------------------------------------------------------------------
def name
$map_infos = load_data("Data/MapInfos.rxdata") if $map_infos.nil?
$map_infos[@map_id].name
end
end
#==============================================================================
# ■ Scene_Battle
#==============================================================================
class Scene_Battle
#--------------------------------------------------------------------------
# ● 메인 처리
#--------------------------------------------------------------------------
alias xrxs20_main main
def main
xrxs20_main
if $scene.is_a?(Scene_Map) and (not XRXS20_Config::SCENE_BATTLE_TO_SCENE_MAP)
$scene.initialize_map_name_window($game_map.name)
end
end
end

Who's 백호

?

이상혁입니다.

http://elab.kr


List of Articles
번호 분류 제목 글쓴이 날짜 조회 수
공지 스크립트 자료 게시물 작성시 주의사항 습작 2012.12.24 6153
34 HUD 맵이름 넣기(bs님의 강의랑 다르게 스크립트로) 16 file 아방스 2007.11.09 2982
33 HUD 맵 이름 뛰우기 10 WMN 2008.03.17 1966
32 HUD HP과 SP 바 19 Man... 2008.11.04 4534
31 HUD 맵이름표시 ps인간 2009.01.23 3441
30 HUD 게임 플레이시 맵의 이름을 표시하는 스크립트 1 file 백호 2009.02.21 1935
29 HUD HP/SP 상태를 표시해주는 간이 윈도우 3 file 백호 2009.02.21 3068
28 HUD 적의 남은 HP만큼 적의 이름 색깔 변하는 스크립트 6 file 백호 2009.02.21 2337
» HUD 맵명을 표시하는 스크립트 한글로 번역한것 백호 2009.02.21 1257
26 HUD xp대화창에 얼굴, 이름 넣기!! [방법두 있음] 3 백호 2009.02.21 3545
25 HUD 직업명띄우기 스크립트 2 백호 2009.02.21 1123
24 HUD 새로운방법의 맵이름 표시 31 file 백호 2009.02.21 4617
23 HUD Advanced HUD Script 3 file 백호 2009.02.22 1341
22 HUD 맵 이름 표시 by Slipknot@rmxp.net (SDK호환) 2 백호 2009.02.22 1463
21 HUD 넷플레이 HUD표시 2 file 백호 2009.02.22 3094
20 HUD HUD Menu 1.2 by Raziel 6 file 백호 2009.02.22 2390
19 HUD 머리위에 직업명을 표시해줍니다... 9 file 제로스S2 2009.08.03 2465
18 HUD [맵이동시 맵이름을 표시] 심플한 디자인 36 file 제로스S2 2009.08.05 5000
17 HUD [VX 가능] 이벤트 이름 띄우기 41 file 독도2005 2009.08.22 3902
16 HUD 이름띄우기스크립트 - [ID홍길동] 이 아닌 [홍길동]으로 표기하기 27 블루레스 2009.11.06 4054
15 HUD 맵이름스크립트 52 file 이안 2010.01.17 3554
Board Pagination Prev 1 2 Next
/ 2