Last active
August 25, 2022 09:15
-
-
Save Erisa/0683c114ca7d39193fc440083e8553cc to your computer and use it in GitHub Desktop.
Seriel ~ Transfer Player on Gameover
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if true #Set to false to disable script. | |
# Copyright Erisa A. (erisa.uk) 2018 | |
############################################################################### | |
# Seriel ~ Transfer Player on Gameover ~ <3 # | |
#=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=# | |
# The code here can be reused for any purpose, with credit given. # | |
# This includes both Commercial and Non-Commercial use. # | |
# However, contact is appreciated before Commercial use. # | |
#=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=# | |
# Contact: | [email protected] # | |
#=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=# | |
# Created with ♥ by Erisa A (2018-2019) # | |
# Last edited: 2019-01-14 23:44:29 +0000 # | |
############################################################################### | |
# Edit below here ↓ to configure the script. | |
module SerieTransferOnGameover | |
# The ID of the map that the player should be sent to. | |
MAP_ID = 1 | |
# The X and Y co-ordinates of the map where the player should be sent. | |
# The third argument is direction where: | |
# 2: down, 4: left, 6: right, 8: up | |
# Format: [x,y,d] | |
MAP_COORDS = [10,5,2] # [x,y,direction] | |
# Optional, change nil to a Common Event ID to play it on tranfer. | |
# This can be used for example to display a message box or change gold values. | |
EVENT_ID = nil | |
end | |
#============================================================================== | |
# ** Scene_Gameover | |
#------------------------------------------------------------------------------ | |
# This class performs game over screen processing. | |
#============================================================================== | |
class Scene_Gameover < Scene_Base | |
#-------------------------------------------------------------------------- | |
# * Start Processing | |
#-------------------------------------------------------------------------- | |
def start | |
super | |
params = SerieTransferOnGameover::MAP_COORDS | |
map = SerieTransferOnGameover::MAP_ID | |
SceneManager.clear | |
$game_party.members.each { |actor| actor.hp = 1; actor.mp = 1} | |
SceneManager.goto(Scene_Map) | |
$game_player.reserve_transfer(map, params[0], params[1], params[2]) | |
unless SerieTransferOnGameover::EVENT_ID.nil? | |
$game_temp.reserve_common_event(SerieTransferOnGameOver::EVENT_ID) | |
end | |
end | |
def update | |
end | |
def perform_transition | |
end | |
undef play_gameover_music | |
undef fadeout_speed | |
undef fadein_speed | |
undef goto_title | |
def dispose_background | |
end | |
end | |
end # of the script |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment