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 6205
601 기타 [자작]칼라 테이블입니다. 3 나뚜루 2009.01.24 1621
600 타이틀/게임오버 심심해서 구현해본 타이틀음악만으로 게임 플레이하기 2 백호 2009.02.22 1621
599 전투 레벨업시 능력치 표시 2 백호 2009.02.22 1621
598 파티 메뉴커맨드로 파티 멤버들 순서 바꾸기 by Yargovish 1 백호 2009.02.22 1622
597 이동 및 탈것 新(?)대쉬기능 스크립트.. 3 백호 2009.02.22 1626
596 전투 KGC_SPdamage (SP데미지) 3 file 백호 2009.02.22 1631
595 스킬 선택 스킬 스크립트 4 file 백호 2009.02.21 1632
594 스킬 Conditional+Conbo Skills 2.0 by trickster 2 file 백호 2009.02.22 1637
593 기타 endroll 주석 번역 6 file insertend 2010.05.15 1638
592 저장 ASM - Advanced Save Menu 3 file 백호 2009.02.21 1639
591 전투 Mr. Mo's ABS Ultimate 1.2 by DerVVulfman Alkaid 2011.11.13 1640
590 그래픽 Pictures below Characters by PK8 (XP/VXA) Alkaid 2012.09.07 1643
589 스킬 스킬 업데이트 시스템 4 file 백호 2009.02.22 1644
588 변수/스위치 메뉴변수표시 스크립트 1 file 백호 2009.02.22 1645
587 전투 DerVVulfman's addons for Mr.Mo's ABS file Alkaid 2010.09.10 1645
586 전투 Minkoff's Animated Battlers - Enhanced 13.3 by DerVVulfman file Alkaid 2010.10.14 1646
585 타이틀/게임오버 맵화면을 타이틀에 표시 백호 2009.02.21 1648
584 전투 전투시 아이콘 윈도우 2 file 백호 2009.02.21 1650
583 저장 [KGC]_2PaneSave 스크립트 1 file 백호 2009.02.22 1655
582 전투 KGC_RateDamage(비율 데미지) 3 file 백호 2009.02.22 1657
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