Guest Access
Administrator
Administrator
Administrator
profile
G@MeF@Ce
profile
Scrolling Game Over script.
*no longer impressed by that regular game over scene, you know the one that just shows a picture and that's it? Well check this one out...
some time ago I found an animated Game Over script by D.Lord from http://www.reinorpg.com
as time flew by... and after learning more RGSS, I took another look at the script and noticed how simple the script was so I thought I would rewrite my own version. I've included a user-friendly module for easy setup, more graphic layers, and in future versions I plan to put in some extra features like a menu for continue, restart, sounds, animations, etc... enjoy ~
Script v1.0 (copy and paste new script page with RMXP (F11):
picture resources (copy images to folders, 1 to gameover and the rest to graphics:
Demo v1.0
*no longer impressed by that regular game over scene, you know the one that just shows a picture and that's it? Well check this one out...
some time ago I found an animated Game Over script by D.Lord from http://www.reinorpg.com
as time flew by... and after learning more RGSS, I took another look at the script and noticed how simple the script was so I thought I would rewrite my own version. I've included a user-friendly module for easy setup, more graphic layers, and in future versions I plan to put in some extra features like a menu for continue, restart, sounds, animations, etc... enjoy ~
Script v1.0 (copy and paste new script page with RMXP (F11):
- Code:
################################################################################
# Scrolling Gameover for RMXP by G@MeF@Ce 4/17/2012
# credits and special thanks to D.Lord for the example +
################################################################################
module G101_OVER
#[Layer 1 settings]
L1P = "pulse" #layer 1 picture name in picture folder
L1Z = 50 #layer 1 front - back (stack) position
L1X = 15 #layer 1 horizontal scroll
L1Y = 0 #layer 1 vertical scroll
#[Layer 2 settings]
L2P = "Blink" #layer 1 picture name in picture folder
L2Z = 2 #layer 1 front - back (stack) position
L2X = 0 #layer 1 horizontal scroll
L2Y = 250 #layer 1 vertical scroll
#[Layer 3 settings]
L3P = "over" #layer 1 picture name in picture folder
L3Z = 2 #layer 1 front - back (stack) position
L3X = 150 #layer 1 horizontal scroll
L3Y = 0 #layer 1 vertical scroll
#[Layer 4 settings]
L4P = "over" #layer 1 picture name in picture folder
L4Z = 50 #layer 1 front - back (stack) position
L4X = 1 #layer 1 horizontal scroll
L4Y = 0 #layer 1 vertical scroll
#[Input setting]
OVER_BUTTON = Input::C
#will add sound, animation, transition, options, etc...
end
##################################[script]######################################
class Scene_Gameover
include G101_OVER
#set opacity and front to back layer position
def main
#layer1
@layer1 = Plane.new
@layer1.bitmap = RPG::Cache.picture(L1P)
@layer1.z = L1Z
@layer1.opacity = 160
#layer2
@layer2 = Plane.new
@layer2.bitmap = RPG::Cache.picture(L2P)
@layer2.z = 2
@layer2.opacity = 255
#layer3
@layer3 = Plane.new
@layer3.bitmap = RPG::Cache.picture(L3P)
@layer3.z = 54
@layer3.opacity = 100
#layer4
@layer4 = Plane.new
@layer4.bitmap = RPG::Cache.picture(L4P)
@layer4.z = 55
@layer4.opacity = 160
#Game Over system graphic
@sprite = Sprite.new
@sprite.bitmap = RPG::Cache.gameover($data_system.gameover_name)
@sprite.z = 20 #
@sprite.opacity = 255
# stop background music and sounds
$game_system.bgm_play(nil)
$game_system.bgs_play(nil)
# play game over melody
$game_system.me_play($data_system.gameover_me)
#
Graphics.transition(120)
# Loop
loop do
Graphics.update
Input.update
update
if $scene != self
break
end
end
#
Graphics.freeze
@layer4.dispose
@layer3.dispose
@layer2.dispose
@layer1.dispose
#
@sprite.bitmap.dispose
@sprite.dispose
#
Graphics.transition(40)
#
Graphics.freeze
#
if $BTEST
$scene = nil
end
end
def update
#layer 1
@layer1.ox -= L1X
@layer1.oy -= L1Y
#layer 2
@layer2.ox -= L2X
@layer2.oy -= L2Y
#layer 3
@layer3.ox -= L3X
@layer3.oy -= L3Y
#layer 4
@layer4.ox -= L4X
@layer4.oy -= L4Y
#start over button
if Input.trigger?(OVER_BUTTON)
$scene = Scene_Title.new
end
end
end
picture resources (copy images to folders, 1 to gameover and the rest to graphics:
- Spoiler:
- g101_skull
pulse
over
blink
Demo v1.0
Administrator
Show Signature