GameOver To Heaven
Common_Event version
Hello community, this is the first crappy script made by me. Its called GameOver to Heaven, and its simply, when you die a common event is called instead of going to the gameover screen. You can decide what you put in the common event, so its very adjustable. Its common event 1, but you can change that in line 65.
Also it features a command called loss percentage, in there you can set how many of your money is lost. This is done in line 100, just change the 0.5 to what you want to do. Be aware, this is what you loose, not what you keep.
The Script
Screenshots
How can you screenshot this? Lol.
To be made:
- fully scripted, everything done in the script
- switches, after a certain event in the game you get to another spawning spot. (I know, you can do this with the common event now, but its more difficult after the fully scripted version.
Questions? Suggestions? Just post here!
~ Smiff
Oh, and you may use this for everything you want, as long as you give credit.
Common_Event version
Hello community, this is the first crappy script made by me. Its called GameOver to Heaven, and its simply, when you die a common event is called instead of going to the gameover screen. You can decide what you put in the common event, so its very adjustable. Its common event 1, but you can change that in line 65.
Also it features a command called loss percentage, in there you can set how many of your money is lost. This is done in line 100, just change the 0.5 to what you want to do. Be aware, this is what you loose, not what you keep.
The Script
Code:
#==============================================================================
# ** Scene_Gameover
#------------------------------------------------------------------------------
#
# GameOver to Heaven, v2.0
# Made by Mr_Smith, ©Mr_Smith, all rights reserved
#
# What this does? Very easy. It just calls a common event when you die,
# resulting that you lose items or whatever the gamemaker want to.
# Everything you want to happen, is evented in the common event nr. 1.
# Some features, like loss percentage, cant be evented. That is scripted.
# Look furter down for the instructions how to change the percentage.
#
#==============================================================================
class Scene_Gameover
#--------------------------------------------------------------------------
# * Main Processing
#--------------------------------------------------------------------------
def main
$game_temp.gameover = false
# Make game over graphic
@sprite = Sprite.new
@sprite.bitmap = RPG::Cache.gameover($data_system.gameover_name)
# Stop BGM and BGS
$game_system.bgm_play(nil)
$game_system.bgs_play(nil)
# Play game over ME
$game_system.me_play($data_system.gameover_me)
# Execute transition
Graphics.transition(120)
# 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 of game over graphic
@sprite.bitmap.dispose
@sprite.dispose
# Execute transition
Graphics.transition(40)
# Prepare for transition
Graphics.freeze
# If battle test
if $BTEST
$scene = nil
end
end
#--------------------------------------------------------------------------
# * Frame Update
#--------------------------------------------------------------------------
def update
# If C button was pressed
if Input.trigger?(Input::C)
$game_temp.common_event_id = 1
$scene = Scene_Map.new
# Loses the 50% (or any value put in $game_system.loss_percentage)
amount = $game_party.gold * $game_system.loss_percentage
$game_party.lose_gold(amount.to_i) # To force it to be converted into an integer
$game_map.autoplay
end
end
end
class Interpreter
#--------------------------------------------------------------------------
# * Game Over
#--------------------------------------------------------------------------
def command_353
# Set game over flag
$game_temp.gameover = true
# End
# Increases the index
@index += 1
return false
end
end
#-----------------------------------------------------------------------------
# * Money loose percentage.
# In line 100, you see a number. 0.5, in this case. This means you loose
# 50% of the money you have. So, if you have 10.000, you have only 5.000
# left, in this case. You can change it in whatever you want, even
# 0.3485782978479312 if you really want to.
#-----------------------------------------------------------------------------
class Game_System
attr_accessor :loss_percentage
alias old_game_system_init initialize
def initialize
old_game_system_init
@loss_percentage = 0.5
end
end
Screenshots
How can you screenshot this? Lol.
To be made:
- fully scripted, everything done in the script
- switches, after a certain event in the game you get to another spawning spot. (I know, you can do this with the common event now, but its more difficult after the fully scripted version.
Questions? Suggestions? Just post here!
~ Smiff
Oh, and you may use this for everything you want, as long as you give credit.