Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # Snippet to automatically respawn onto an area of the map when gameover.
- # usefull for people who want to respawn :)
- module ReSpawn
- Use_Respawn = true
- Map_id = 1
- Map_x = 5
- Map_y = 5
- Direction = 2
- end
- #================
- class Scene_Base
- #================
- include ReSpawn # include module
- #--------------------------------------------------------------------------
- # * Determine if Game Is Over
- # Transition to the game over screen if the entire party is dead.
- #--------------------------------------------------------------------------
- alias :respawn_check_GO :check_gameover
- def check_gameover
- if $game_party.all_dead? && Use_Respawn
- # To recover all status / hp to avoid scene re-triggering constantly, important !!
- $game_party.battle_members.each {|member| member.recover_all }
- # Perform Transfer
- $game_player.reserve_transfer(Map_id, Map_x, Map_y, Direction)
- $game_player.perform_transfer
- else
- # performs old method, looks like this..
- # SceneManager.goto(Scene_Gameover) if $game_party.all_dead?
- respawn_check_GO
- end
- end
- end
- #===============================================================================#
- # http://dekitarpg.wordpress.com/ #
- #===============================================================================#
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement