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 6203
601 장비 KGC_장비확장 (7/30일자) 12 file 백호 2009.02.22 2055
600 전투 SBABS v4 (A-RPG) 5 file 백호 2009.02.22 2055
599 메뉴 Trickster's Plug 'n' Play Gradient Bar 2.0 1 file 백호 2009.02.22 2051
598 전투 SBABS v3 6 file 백호 2009.02.22 2046
597 그래픽 Transition Pack 1.11 by Fantasist Alkaid 2011.01.22 2044
596 메뉴 넷플레이 업그레이드됀 메뉴 스크립트 4 백호 2009.02.22 2040
595 HUD HUD Menu 2.0 by Raziel 3 Alkaid 2010.09.07 2038
594 전투 [신기술 체험] Tactical Battle System 9 file 백호 2009.02.22 2034
593 기타 자동미로 12 file 백호 2009.02.22 2032
592 스킬 KGC_CrashSkill(자폭스킬) 4 file 백호 2009.02.22 2030
591 아이템 흠..몬스터도감말고 아이템도감~ 9 백호 2009.02.21 2028
590 메시지 Hermes(Hermes Extends RPGXP Message System) 0.3d by derula Alkaid 2010.09.10 2025
589 상점 ▼▲▼ XRXS36. 숍·변동시장 ▼▲▼ (시세) 8 D.S.Y 2008.12.09 2025
588 기타 요리 시스템 스크립트 12 file 백호 2009.02.21 2023
587 장비 착용한 장비에 따라 모습이 달라지는 스크립트 예제 5 file 게임애호가 2015.02.14 2018
586 이동 및 탈것 테두리 글자 & 그림자 글자 2 file 백호 2009.02.21 2015
585 스킬 MicKo's Skill Tree 1.2 by DerVVulfman 2 Alkaid 2011.03.15 2010
584 기타 회복으로 데미지를 받는 좀비 스크립트 7 백호 2009.02.22 2010
583 메뉴 메뉴....있길래올립니다. 9 벨☆ 2010.01.23 2001
582 이동 및 탈것 이동루트 설정 스크립트-특정범위 13 file 『★Browneyedgirls』 2010.02.18 2000
Board Pagination Prev 1 ... 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 ... 52 Next
/ 52