XP 스크립트

맵에 들어갔을 때 맵 이름이 표시된 창을 띄우는 스크립트입니다.  이벤트에서 불러낼 때는 이벤트 명령->스크립트에서 $game_temp.show_mapname = true 라고 하면 됩니다.

#==============================================================================
# ** Show Map Name
#------------------------------------------------------------------------------
# Slipknot
# 1.0
# 03.31.06
#==============================================================================

SDK.log('Show_Map_Name', 'Slipknot', '1.0', '03.31.06')

#--------------------------------------------------------------------------
# Begin SDK Enabled Check
#--------------------------------------------------------------------------
if SDK.enable('Show_Map_Name')
#--------------------------------------------------------------------------

$data_mapinfos = load_data('Data/MapInfos.rxdata')

module Show_Map_Name
#--------------------------------------------------------------------------
Show_Frames = 30
Back_Opacity = 160
Y = 32
#--------------------------------------------------------------------------
end

#------------------------------------------------------------------------------
# Begin Game_Map Edit
#------------------------------------------------------------------------------
class Game_Map
#--------------------------------------------------------------------------
alias slipknot_showmapname_gamemap_setupmapid setup_map_id
alias slipknot_showmapname_gamemap_update update
#--------------------------------------------------------------------------
def setup_map_id(map_id)
slipknot_showmapname_gamemap_setupmapid(map_id)
if $game_temp.show_mapname
@window_mapname = Window_MapName.new(map_id)
$game_temp.show_mapname = false
end
end
#--------------------------------------------------------------------------
def dispose_window_mapname
unless @window_mapname.nil? or @window_mapname.disposed?
@window_mapname.dispose
end
end
#--------------------------------------------------------------------------
def update
slipknot_showmapname_gamemap_update
unless @window_mapname.nil? or @window_mapname.disposed?
@window_mapname.update
end
end
end
#------------------------------------------------------------------------------
# End Game_Map Edit
#------------------------------------------------------------------------------

#------------------------------------------------------------------------------
# Begin Scene_Map Edit
#------------------------------------------------------------------------------
class Scene_Map
#--------------------------------------------------------------------------
alias slipknot_showmapname_scenemap_maindispose main_dispose
#--------------------------------------------------------------------------
def main_dispose
slipknot_showmapname_scenemap_maindispose
$game_map.dispose_window_mapname
end
end
#------------------------------------------------------------------------------
# End Scene_Map Edit
#------------------------------------------------------------------------------

#------------------------------------------------------------------------------
# Begin Game_Temp Edit
#------------------------------------------------------------------------------
class Game_Temp
#--------------------------------------------------------------------------
attr_accessor(:show_mapname)
#--------------------------------------------------------------------------
alias slipknot_showmapname_gametemp_init initialize
#--------------------------------------------------------------------------
def initialize
slipknot_showmapname_gametemp_init
@show_mapname = false
end
end
#------------------------------------------------------------------------------
# End Game_Temp Edit
#------------------------------------------------------------------------------

class Window_MapName < Window_Base
#--------------------------------------------------------------------------
include(Show_Map_Name)
#--------------------------------------------------------------------------
def initialize(map_id)
name = $data_mapinfos[map_id].name
dumb = Bitmap.new(128, 32)
width = dumb.text_size(name).width + 32
dumb.dispose
super(320 - width / 2, Y, width, 64)
self.contents = Bitmap.new(width - 32, 32)
self.contents.draw_text(0, 0, width - 32, 32, name, 1)
self.opacity = 0
self.back_opacity = Back_Opacity
@phase = 1
@otime = 4
@time = Show_Frames
end
#--------------------------------------------------------------------------
def opacity=(val)
super(val)
self.contents_opacity = val
end
#--------------------------------------------------------------------------
def update
if @otime > 0
@otime -= 1
return
end
if @phase == 1 and opacity < 255
self.opacity += 32
return
elsif @phase == 1 and opacity == 255
@phase = 2
return
end
if @time > 0
@time -= 1
else
if self.opacity == 0
self.dispose
return
end
self.opacity -= 48
end
end
end

#--------------------------------------------------------------------------
# End SDK Enabled Test
#--------------------------------------------------------------------------
end
#--------------------------------------------------------------------------

Who's 백호

?

이상혁입니다.

http://elab.kr


List of Articles
번호 분류 제목 글쓴이 날짜 조회 수
공지 스크립트 자료 게시물 작성시 주의사항 습작 2012.12.24 6153
701 기타 [신기술 체험] RM포트리스 4 file 백호 2009.02.22 1428
700 전투 KGC_AutoRecover(매턴 자동 회복) 1 백호 2009.02.22 1430
699 메뉴 Leidy's Ring Command Window 1.2 by DerVVulfman Alkaid 2012.09.09 1430
698 전투 Mr Mo DVV Addon #20~#21 Alkaid 2011.09.05 1432
697 기타 모험 일기 스크립트 2 file 백호 2009.02.21 1433
696 전투 대전게임 Fighter 1 file 백호 2009.02.21 1436
695 스킬 Grouping and Details 8.1 by DerVVulfman 4 file Alkaid 2011.04.18 1437
694 전투 Mr. Mo's ABS Ultimate by DerVVulfman Alkaid 2011.09.05 1438
693 전투 전투 난이도 설정 스크립트 file 백호 2009.02.21 1441
692 전투 배틀 리포트 화면 변경 스크립트 2 file 백호 2009.02.21 1442
691 기타 필드에서 경험치%를 표시합니다. 4 file 백호 2009.02.22 1448
690 기타 프리 윈도우 스크립트 (상입오두막 출처) 6 백호 2009.02.21 1449
689 기타 sandgolem Script Archive (RMXP SDK 1.5 이상 필요) file Alkaid 2011.02.17 1453
688 전투 SG_Batte Retry ver.4 by sandgolem 2 백호 2009.02.22 1457
687 전투 S ABS_NonSDK ver 1 file 백호 2009.02.22 1458
686 전투 Minkoff's Animated Battlers - Enhanced 13.4 by DerVVulfman 2 Alkaid 2011.07.13 1458
685 전투 추적 공격 스크립트 백호 2009.02.21 1459
684 메뉴 FF7형식의 메뉴로 변경하는 스크립트 1 file 백호 2009.02.21 1463
» HUD 맵 이름 표시 by Slipknot@rmxp.net (SDK호환) 2 백호 2009.02.22 1463
682 장비 MultiSlots! 2.4 by DerVVulfman 2 Alkaid 2011.09.05 1466
Board Pagination Prev 1 ... 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 ... 52 Next
/ 52