XP 스크립트

타이틀이 뜨기 전에 이미지를 띄우는 스크립트입니다.(버튼을 눌러서 뛰어넘으면 그 다음에는 'press start'류의 타이틀 화면이.....) 로고기능을 사용하려면 640*64 크기의 이미지를 타이틀 폴더에 넣어야 합니다. 가령:



#==============================================================================
# ** Introduction & Splash System
#==============================================================================
# SephirothSpawn
# Version 2.1
# 2006-03-04
#------------------------------------------------------------------------------
# * Instructions
#
# ~ Customizing Introduction
# $scene = Scene_Introduction.new( intro_pics , splash_file)
#
# intro_pics : [ 'Pic File 1' , 'Pic File 2' , ...]
# splash_file : 'Splash Pic File' / nil for no splash
#------------------------------------------------------------------------------
# * Customization
#
# @index, @speed, @o_speed, @phase = 0, 5, 5, 0
#
# ~ Fade In Speed
# (Change the Second 5 to the Opacity Change Every Frame. Higher = Faster)
#
# ~ Text Fade in Speed
# (Change the Third 5 to the Opacity Change Every Frame. Higher = Faster)
#==============================================================================

#------------------------------------------------------------------------------
# * SDK Log Script-x
#------------------------------------------------------------------------------
SDK.log('Introduction & Splash System', 'SephirothSpawn', 2.1, '2006-03-04')

#------------------------------------------------------------------------------
# * Begin SDK Enable Test
#------------------------------------------------------------------------------
if SDK.state('Introduction & Splash System') == true

#==============================================================================
# ** Scene_Introduction
#==============================================================================

class Scene_Introduction
#--------------------------------------------------------------------------
# * Object Initialization
#--------------------------------------------------------------------------
def initialize(pics, splash = nil)
@pics, @splash = pics, splash
end
#--------------------------------------------------------------------------
# * Main Processing
#--------------------------------------------------------------------------
def main
# Instance Variables
@index, @speed, @o_speed, @phase = 0, 5, 5, 0
# Background Images
@sprite = Sprite.new
@sprite.bitmap = RPG::Cache.title(@pics[@index])
@sprite.opacity = 5
# Start Logo
@start = Sprite.new
@start.bitmap = RPG::Cache.title("Start")
@start.y, @start.z, @start.opacity = 416, 10, 0
# Loads Data System and Game System to Play BGM
data_system = load_data("Data/System.rxdata")
game_system = Game_System.new
game_system.bgm_play(data_system.title_bgm)
# Execute transition
Graphics.transition
# Main loop
loop do
# Update game screen
Graphics.update
# Update input information
Input.update
# Frame update
update
# Abort loop if screen is changed
if $scene != self
break
end
end
# Prepare for transition
Graphics.freeze
# Dispose Sprites
@sprite.dispose
@start.dispose
# Make Scene Nil
$scene = nil
end
#--------------------------------------------------------------------------
# * Frame Update
#--------------------------------------------------------------------------
def update
case @phase
when 0 # Introduction Procreesing
update_intro
when 1 # Splash Procreesing
update_splash
when 2 # Splash Transition
to_splash_transition
when 3 # Title Transition
to_title_transition
when 4 # Change to Title
$scene = nil
end
end
#--------------------------------------------------------------------------
# * Frame Update : Intro Images
#--------------------------------------------------------------------------
def update_intro
# If C is pressed
if Input.trigger?(Input::C)
@phase = @splash.nil? ? 3 : 2
end
# Updates Sprite Opacity
@sprite.opacity += @speed
# Changes Direction
@speed *= -1 if @sprite.opacity >= 255
# Change Sprite
if @sprite.opacity <= 0
@index += 1 ; @speed *= -1
@index == @pics.size ? @phase = @splash.nil? ? 3 : 2 :
@sprite.bitmap = RPG::Cache.title(@pics[@index])
end
end
#--------------------------------------------------------------------------
# * Frame Update : Splash Image
#--------------------------------------------------------------------------
def update_splash
# If C is pressed
if Input.trigger?(Input::C)
@phase = 3
end
# Loads Sprite Splash Bitmap
@sprite.bitmap = RPG::Cache.title(@splash)
# Updates Start Logo Opacity
@start.opacity += @o_speed
# Changes Direction
@o_speed *= -1 if @start.opacity >= 255 || @start.opacity <= 0
# Updates Splash
@sprite.opacity += @speed if @sprite.opacity < 255
end
#--------------------------------------------------------------------------
# * Frame Update : Intro To Splash Transistion
#--------------------------------------------------------------------------
def to_splash_transition
@sprite.opacity > 0 ? @sprite.opacity -= @speed : @phase = 1
end
#--------------------------------------------------------------------------
# * Frame Update : Splash To Title Transistion
#--------------------------------------------------------------------------
def to_title_transition
# Decrease Splash Opacity
@sprite.opacity -= @speed if @sprite.opacity > 0
# Decresh Start Logo Opacity
@start.opacity -= @speed if @start.opacity > 0
# Proceed to Title Screen
@phase = 4 if @sprite.opacity <= 0 && @start.opacity <= 0
end
end

#==============================================================================
# ** Pre-Main
#------------------------------------------------------------------------------
# After defining each class, actual processing begins here.
#==============================================================================

unless $DEBUG
begin
# Prepare for transition
Graphics.freeze
# Proceed to Introduction & Splash Scene
$scene = Scene_Introduction.new(['001-Title01', '001-Title01'], '001-Title01')
# Call main method as long as $scene is effective
while $scene != nil
$scene.main
end
end
end

#--------------------------------------------------------------------------
# * End SDK Enable Test
#--------------------------------------------------------------------------
end

Who's 백호

?

이상혁입니다.

http://elab.kr


List of Articles
번호 분류 제목 글쓴이 날짜 조회 수
공지 스크립트 자료 게시물 작성시 주의사항 습작 2012.12.24 6159
461 키입력 전체키 입력 스크립트 v4 by Cybersam 5 file 백호 2009.02.22 1948
460 키입력 Glitchfinder's Input Modules (XP/VX 공용) 2 Alkaid 2011.03.19 1952
459 이동 및 탈것 Super Simple Vehicle System Enhanced 8.0 by DerVVulfman 1 Alkaid 2010.12.12 1956
458 기타 [All RGSS] 윈도우 커서 숨기기/보이기 1 file Cheapmunk 2014.03.02 1957
457 기타 [신기술 체험] 오투잼 스크립트 7 file 백호 2009.02.22 1959
456 전투 KGC_BattlerEffect(버틀러 효과) 2 file 백호 2009.02.22 1959
455 저장 세이브 & 로드 화면 개조 스크립트 file 백호 2009.02.21 1962
454 메뉴 개별 메뉴 호출 단축키 스크립트 5 file 백호 2009.02.21 1965
453 HUD 맵 이름 뛰우기 10 WMN 2008.03.17 1966
452 상태/속성 KGC_StateIcon(스테이터스 아이콘 표시) 2 file 12345678 2010.02.03 1967
451 그래픽 MAWS: Modified Advanced Weather Script 1.2 by Agckuu Coceg 2 file Alkaid 2010.09.13 1969
450 기타 Project RGSS3 by joe5491 6 습작 2013.05.06 1970
449 저장 심플 세이브 로드(1개의 세이브 사용하기) 3 백호 2009.02.22 1971
448 메뉴 링 메뉴 Edited by Hypershadow180@rmxp.net 1 file 백호 2009.02.22 1975
447 스킬 스킬 레벨 스크립트 # 번역 진행중 6 빗자루씨 2010.02.11 1981
446 맵/타일 World Map 스크립트 1 file 백호 2009.02.21 1983
445 저장 Improved Save by gerrtunk 2 file Alkaid 2010.10.13 1983
444 저장 렉없는 자동세이브(중복임??) 4 캉쿤 2011.09.12 1986
443 장비 전투중에 장비변경 from RGSS Wiki 1 백호 2009.02.22 1988
442 기타 동료들이 기차처럼 줄줄 따라온다!? 7 file 백호 2009.02.21 1990
Board Pagination Prev 1 ... 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 ... 52 Next
/ 52