Teleport to a specific location after random encounter instead of game over

At this moment, I loathe my husband's request.  >:(

He asked me to program a "remake" of his favorite game, Dragon Warrior, with better graphics. 

I am almost done, but I cannot get ANY game over event scripts to work for random encounters. Even if I change Scene_game over title screen value, and Scene_map check_gameover values. 

I did get the common event parts to work, so.....I guess that's a good thing?

Ugggh. D:<

Is there anyone out there that can go step by step with me on how to get it to work for random encounters, or make a new script to bypass all of it? I'm just scratching the surface of scrips. I don't know much yet.


Thank you much!

🤘   😛   🤘
Can you explain what you're trying to achieve? Are you trying to make it go to a particular map instead of game over when the player loses a battle? Is it for ALL encounters or just random encounters? I'm sure this has been requested before, so there's likely a script out there somewhere. If you list which ones you've tried, we could at least take a look at them and see if there's a bug.
I looked into the scripts I found that have the same type of request, tried editing the script under Scene_game and Scene_map, but even though I followed the instructions. It is still not working. I'm probably doing it wrong. 

I just want the game over from random encounters to bypass the game over screen and teleport back to a set location. 

I have looked into the script work of the following 2 that don't apply to game overs but do offer teleport, but since I am still new to it, all I did was fiddle around, then came here for assistance:

http://forums.rpgmakerweb.com/index.php?/topic/4711-xs-teleport/

http://forums.rpgmakerweb.com/index.php?/topic/13032-d13x-teleport/

http://forums.rpgmakerweb.com/index.php?/topic/10813-change-death-to-transfer-to-a-position/ - this was the one I tried first

http://forums.rpgmakerweb.com/index.php?/topic/18135-gameover-help/ - I read through this one, tried the death/immortal state, but it loops the random battle until the enemy is dead because I have a common event set up to transfer to the king, then have all stats restored. So, with all stats restored, the conditional requirement is no longer in effect. 

http://rpgmaker.net/scripts/334/ is the script that I am using for my death scene common event with the Dragonlord. It works super well, but is ONLY for triggered events, not random 🙁  
If your goal is to teleport the player to a specific place through common event, you'll be able to pull it off with Yanfly's Death Common Event.
It's a pain to have to import an entire battle system script, that has another necessary supporting script, just to get one small thing to function, though.


Tsukihime wrote a script JUST to make sure common events were executed at the end of a battle. It does nothing else. That would be far more useful.
I'd imagine. I talked it over with my husband and if no one has any suggestions on how to fix this, then he can deal with it. 

He's a little better at scripting than I am so he is going to give it a go. 

Thanks though!
 
This works?

Sorry for being in portuguese, but it is easy to understand where to modify the values, I didn't test it a lot xD, just did a time in the past...

Spoiler
Code:
#=======================================================#         Game Over por Eventos# Autor: Raizen# Comunidade: www.centrorpg.com# O script fará com que o jogador ao acontecer o gameover, ele vá# para o mapa escolhido, assim possibilitando gameovers totalmente por eventos#=======================================================module Lune_Event_Over# Configure aqui o mapa e as posições do personagem # para aonde ele irá no game over.# ID do mapaMAP_ID = 2# Map pos XX = 5# Map pos YY = 5end#==============================================================================# ** Scene_Gameover#------------------------------------------------------------------------------#  Esta classe executa o processamento da tela de game over.#==============================================================================class Scene_Gameover < Scene_Base  #--------------------------------------------------------------------------  # * Processamento principal  #--------------------------------------------------------------------------  def start    super    DataManager.setup_game_over    $game_map.autoplay    $game_map.update    SceneManager.goto(Scene_Map)  end  #--------------------------------------------------------------------------  # * Finalização do processo  #--------------------------------------------------------------------------  def terminate    super  endend#==============================================================================# ** DataManager#------------------------------------------------------------------------------#  Este módulo gerencia o jogo e objetos do banco de dados utilizados no jogo.# Quase todas as variáveis globais são inicializadas no módulo.#==============================================================================module DataManager   #--------------------------------------------------------------------------  # * Criação de uma tela de gameover  #--------------------------------------------------------------------------  def self.setup_game_over    $game_map.setup(Lune_Event_Over::MAP_ID)    $game_player.moveto(Lune_Event_Over::X, Lune_Event_Over::Y)    $game_player.refresh  endend
I just gave you a suggestion. I said Tsukihime wrote a script to do exactly that.

Original thread: https://forums.rpgmakerweb.com/threads/teleport-to-a-specific-location-after-random-encounter-instead-of-game-over.20977/