irpg Community

Full Version: สคริปทำ credit roll แบบหนัง
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
หลายคนอยากทำ credit เลื่อนขึ้นไปเรื่อยๆแบบหนังใช่ไหมล่ะ ใช้สคริปนี้เลย ผมก็ใช้ทุกเกม ตอนนี้ติดไปละ

ก่อนที่จะไปดูสคริป ขอเล่าก่อนว่าสคริปนี้ใครเขียนก็ไม่รู้ มันนานมากๆแล้วจนกระทู้ต้นฉบับได้หายไป ใครที่ทราบเจ้าของสคริปนี้ช่วยแจ้งด้วยนะครับPoker Face

ก็อปสคริปนี้ไปไว้เหนือ main

แก้เนื้อหาตั้งแต่ CREDIT=<<_END_ ลงไปจนถึง _END_ อีกฝั่งนึง

เมื่อจะเรียกใช้ ให้เรียกสคริปดังนี้ $scene = Scene_Credit.new

Code:
class Scene_Credit
CREDIT=<<_END_
PRODUCER
Shadow Man



STORY
Shadow Man
Kitty508



GAME SYSTEM
Shadow Man
Lightning_Wolf



RUBY SCRIPTS
Nechigawara's Script Shooting System
Plugz's Hero Detection
Wachunga's Fog of War
Woratana's Missing File Prevention



CHARACTER SPRITES
Enterbrain
Sithjester
ccoa
satana_81
Land of Shadows


MAPS
Shadow Man
Kitty508



TILESETS
Enterbrain
Sithjester
http://yms.raindrop.jp/



SOUNDS & MUSICS
Enterbrain
Ku-on
Midnight Syndicate
Higurashi no naku koro ni
Silent Hill series
Siren : Blood Curse
Sonic-R



BETA TESTERS
Kenji Naomi
Puma3D
Knight of Pound
Star Dragon 66



GAME ENGINE
Enterbrain



SPECIAL THANKS
HB Games Community






And you...








------ Hell Hallow Knight ------

Shadow Man Presents



_END_
#----พอแล้วนะ จะเพิ่มอีกก็ได้แต่ห้ามยุ่งข้างล่าง
end
class Scene_Credit
def initialize(return_scene = nil)
if return_scene.nil?
return_scene = Scene_Title.new
end
@return_scene = return_scene
end
def scene_start
credit_lines = CREDIT.split(/\n/)
credit_bitmap = Bitmap.new(640,48 * credit_lines.size)
credit_lines.each_index do |i|
line = credit_lines[i]
credit_bitmap.font.name = "FreesiaUPC"
credit_bitmap.draw_text(0,i * 48,640,32,line,1)
end
@credit_sprite = Sprite.new(Viewport.new(0,50,640,380))
@credit_sprite.bitmap = credit_bitmap
@credit_sprite.oy = -430
@frame_index = 0
@last_flag = false
end
def scene_end
@credit_sprite.dispose
end
def last?
return (@frame_index >= @credit_sprite.bitmap.height + 480)
end
def last
if not @last_flag
Audio.bgm_fade(10000)
@last_flag = true
@last_count = 0
else
@last_count += 1
end
if @last_count >= 300
$scene = @return_scene
end
end
def update
@frame_index += 1
return if cancel?
last if last?
@credit_sprite.oy += 1
end
def cancel?
return false
end
def main
scene_start
# Transition Initialization
Graphics.transition
# Main Loop
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
$scene = Scene_Map.new
end
end
# Scene_Credit

ถ้าอยากให้มีเพลงด้วย ก็เล่นเพลงก่อนนะครับค่อยเรียกสคริป
ใช้กับ RGSS3 ได้มิ
ไม่ได้อ่ะคับ