WR Heart rpg
Vuoi reagire a questo messaggio? Crea un account in pochi clic o accedi per continuare.

Scena crediti

Andare in basso

iconvx Scena crediti

Messaggio Da LusianL il Gio Mag 10, 2012 1:24 pm

Scena crediti


Autore:Dr?

Descrizione
Richiama una schermata con i titoli dei crediti come nei film.

Screen

Scena crediti Tt11

Script
Spoiler:

Codice:
#Font
CREDITS_FONT = "Times New Roman"
CREDITS_SIZE = 24
CREDITS_OUTLINE = Color.new(0,0,127, 255)
CREDITS_SHADOW = Color.new(0,0,0, 100)
CREDITS_FILL = Color.new(255,255,255, 255)
#==============================================================================
# � Scene_Credits
#------------------------------------------------------------------------------
# This script has been edited from the original RPG Maker XP version.
#------------------------------------------------------------------------------
# It now uses pictures from the pictures folder instead of titles from the
# titles folder.
#------------------------------------------------------------------------------
# This script might need the RMXP to RMVX Compatibility Patch avialble at RPG
# Maker.net
#------------------------------------------------------------------------------
# Edited by Mac Malone (Dr.?)
# Fixed by Garpie
# XP Version: Oringinal Author unknow, but edidted by MiDas Mike so it doesn't
# play over the Title, but runs by calling the following:
# $scene = Scene_Credits.new
#==============================================================================
class Scene_Credits
#-------------------------------------------------------------------------------
# Credit Speed
# - This is the credits speed:
# 5 - Double Speed
# 10/1 - Normal Speed
# 20 - Half Speed
#-------------------------------------------------------------------------------
CREDIT_SPEED = 10
# This next piece of code is the credits.
# Start Editing
CREDIT=<<_END_
Untitled Project
Director
---------------

Scripts
---------------

Graphics
---------------

Music and sound
---------------

Mapping
---------------

Storyline
---------------

Beta Testers
---------------

Special Thanks
---------------

---------------

_END_
#Stop Editing
def initialize
@inc = 0
end
def main
#-------------------------------
# Animated Background Setup
#-------------------------------
@sprite = Sprite.new
#@sprite.bitmap = Cache.picture($data_system.title_name)
@backgroundList = ["001-Title01"] #Edit this to the picture(s) you wish to show in the background. They do repeat.
@backgroundGameFrameCount = 0
# Number of game frames per background frame.
@backgroundG_BFrameCount = 3.4
@sprite.bitmap = Cache.picture(@backgroundList[0])
#------------------
# Credits Setup
#------------------
credit_lines = CREDIT.split(/\n/)
credit_bitmap = Bitmap.new(550,32 * credit_lines.size)
credit_lines.each_index do |i|
line = credit_lines[i]
credit_bitmap.font.name = CREDITS_FONT
credit_bitmap.font.size = CREDITS_SIZE
x = 0
credit_bitmap.font.color = CREDITS_OUTLINE
credit_bitmap.draw_text(0 + 1,i * 32 + 1,550,32,line,1)
credit_bitmap.draw_text(0 - 1,i * 32 + 1,550,32,line,1)
credit_bitmap.draw_text(0 + 1,i * 32 - 1,550,32,line,1)
credit_bitmap.draw_text(0 - 1,i * 32 - 1,550,32,line,1)
credit_bitmap.font.color = CREDITS_SHADOW
credit_bitmap.draw_text(0,i * 32 + 8,550,32,line,1)
credit_bitmap.font.color = CREDITS_FILL
credit_bitmap.draw_text(0,i * 32,550,32,line,1)
end
@credit_sprite = Sprite.new(Viewport.new(0,50,550,416))
@credit_sprite.bitmap = credit_bitmap
@credit_sprite.z = 9998
@credit_sprite.oy = -416
@frame_index = 0
@last_flag = false
#--------
# Setup
#--------
# ME?BGS ??????
Audio.me_stop
Audio.bgs_stop
Audio.se_stop
# Transition Initialization
Graphics.transition
# ??????
loop do
# The Game Screen is Renewed
Graphics.update
# Input Information is Updated
Input.update
# Frame Renewal
update
# If the Scene Changes, the Loop is Stopped
if $scene != self
break
end
end
# Preperation for Transition
Graphics.freeze
@sprite.dispose
@credit_sprite.dispose
end
#Checks if credits bitmap has reached it's ending point
def last?
return (@frame_index >= @credit_sprite.bitmap.height + 416)
end
def last
if not @last_flag
@last_flag = true
@last_count = 0
else
@last_count += 1
end
if @last_count <= @credit_sprite.bitmap.height + 416
$scene = Scene_Map.new #Scene_Map.new for Map and Scene_Title.new for Title
end
end
#Check if the credits should be cancelled
def cancel?
if Input.trigger?(Input::C)
$scene = Scene_Map.new #Scene_Map.new for Map and Scene_Title.new for Title
return true
end
return false
end
#--------------------------------------------------------------------------
# ? ??????
#--------------------------------------------------------------------------
def update
@backgroundGameFrameCount = @backgroundGameFrameCount + 1
if @backgroundGameFrameCount >= @backgroundG_BFrameCount
@backgroundGameFrameCount = 0
# Add current background frame to the end
@backgroundList = @backgroundList << @backgroundList[0]
# and drop it from the first position
@backgroundList.delete_at(0)
@sprite.bitmap = Cache.picture(@backgroundList[0])
end
return if cancel?
last if last?
if CREDIT_SPEED == 100
@credit_sprite.oy += 1
else
int = 10.0 / CREDIT_SPEED
if int >= 1
@credit_sprite.oy += int
elsif @inc == 1.0 / int
@credit_sprite.oy += 1
@inc = 0
else
@inc += 1
end
end
end
end


Istruzioni: Per richiamare lo script inserire nel call script:
Codice:
$scene = Scene_Credits.new

_________________________________________________
Premi RpgMaker
Spoiler:


Scena crediti SCContest1OctScena crediti SCContest3OctScena crediti SCContest3OctScena crediti SCContest3OctScena crediti SCContest2OctScena crediti SCContest2OctScena crediti Bestpixel2Scena crediti BestresourCSist2Scena crediti Mostproductive1Scena crediti Iconap13Scena crediti Iconap14Scena crediti Iconap15Scena crediti Iconap16
Scena crediti Screen10
LusianL
LusianL

Data d'iscrizione : 07.07.11
Età : 119
Località : Charsetlandia

Torna in alto Andare in basso

Torna in alto

- Argomenti simili

 
Permessi in questa sezione del forum:
Non puoi rispondere agli argomenti in questo forum.