Domaine concerné: script Logiciel utilisé: RPG Maker VX YYYOOOOO !
Alors voila j'ai un soucis avec ce script :
#Font
CREDITS_FONT = "ELEGANT TYPEWRITER"
CREDITS_SIZE = 20
CREDITS_OUTLINE = Color.new(0,0,0, 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.?)
# 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_Credits2.new
#==============================================================================
class Scene_Credits2
# This next piece of code is the credits.
#Start Editing
CREDIT=<<_END_
BLABLABLA
BLABLABLA
BLABLABLA
BLABLABLABLABLABLABLABLABLA
BLABLABLA
BLABLABLA
BLABLABLA
BLABLABLA
BLABLABLA
BLABLABLA
BLABLABLA
BLABLABLA
BLABLABLA
BLABLABLABLABLABLA
BLABLABLABLABLABLA
BLABLABLA
BLABLABLA
BLABLABLA
_END_
#Stop Editing
def main
@halfstep = true
@sprite = Spriteset_Map.new
credit_lines = CREDIT.split(/\n/)
credit_bitmap = Bitmap.new(640,32 * credit_lines.size)
credit_lines.each_index do |i|
line = credit_lines
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,640,32,line,1)
credit_bitmap.draw_text(0 - 1,i * 32 + 1,640,32,line,1)
credit_bitmap.draw_text(0 + 1,i * 32 - 1,640,32,line,1)
credit_bitmap.draw_text(0 - 1,i * 32 - 1,640,32,line,1)
credit_bitmap.font.color = CREDITS_SHADOW
credit_bitmap.draw_text(0,i * 32 + 8,640,32,line,1)
credit_bitmap.font.color = CREDITS_FILL
credit_bitmap.draw_text(0,i * 32,640,32,line,1)
end
@credit_sprite = Sprite.new(Viewport.new(0,50,640,380))
@credit_sprite.bitmap = credit_bitmap
@credit_sprite.z = 9998
@credit_sprite.oy = -430
@frame_index = 0
@last_flag = false
Audio.me_stop
Audio.bgs_stop
Audio.se_stop
Graphics.transition
loop do
Graphics.update
Input.update
update
break if $scene != self
end
Graphics.freeze
@sprite.dispose
@credit_sprite.dispose
end
def last?
return (@frame_index >= @credit_sprite.bitmap.height + 480)
end
def last
if not @last_flag
@last_flag = true
@last_count = 0
else
@last_count += 1
end
if @last_count >= 300
$scene = Scene_Map.new
end
end
def cancel?
if Input.trigger?(Input::C)
$scene = Scene_Map.new
return true
end
return false
end
def update
@halfstep = !@halfstep
return if @halfstep
@sprite.update
last if last?
@credit_sprite.oy += 1
end
end
Mais voila, lorsque le texte a fini de passer, le reste de l'évenement ne s'active pas, le scipt reste coincé. Comment arreter ce script lorsque la text a fini de défiler SANS pouvoir interrombre le texte en appuyant sur une touche s'il vous plait ! :O
|