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 6202
421 파티 메뉴커맨드로 파티 멤버들 순서 바꾸기 by Yargovish 1 백호 2009.02.22 1622
420 기타 Dynamic Stores by Astro_mech@rmxp.net 1 file 백호 2009.02.22 878
419 스킬 약간 수정한 심플액알(크리티컬,스킬) 10 백호 2009.02.22 3836
418 메뉴 Event Spawner 1 file 백호 2009.02.22 980
417 메뉴 새로운 cms 4 file 백호 2009.02.22 2118
416 기타 KGC - RMXP 스크립트 개발용 프로젝트 1.01 4 file 백호 2009.02.22 1515
415 기타 Random Character Generator by SephirothSpawn (SDK호환) 1 백호 2009.02.22 1040
414 전투 마법검 스크립트 1 백호 2009.02.22 1426
413 기타 Terrain Encounter Areas by SephirothSpawn 백호 2009.02.22 778
412 타이틀/게임오버 타이틀 아주 미묘한 효과 5 백호 2009.02.22 1857
411 메시지 1문자식 표시랑 따랑소리 나는 스크립트 8 백호 2009.02.22 2306
410 기타 Multiple Currencies(여러 개의 통화단위 사용) 2 백호 2009.02.22 1124
409 기타 Text Scroll by Dubealex (Release 3) 2 file 백호 2009.02.22 940
408 기타 Near Fantastica's SDK Test Bed 3 file 백호 2009.02.22 885
407 기타 멋진...제작자 정보를 그림으로 1 백호 2009.02.22 1233
406 전투 배틀 포인트 1 백호 2009.02.22 918
405 전투 배틀샵 스크립트 1 백호 2009.02.22 1126
404 온라인 멀티넷스크립트 => 채팅보완 스크립트 8 file 백호 2009.02.22 2931
403 저장 멀티넷스크립트 -> 아이피 세이브,로드 스크립트 9 file 백호 2009.02.22 2206
402 HUD Advanced HUD Script 3 file 백호 2009.02.22 1341
Board Pagination Prev 1 ... 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 ... 52 Next
/ 52