Envision, Create, Share

Welcome to HBGames, a leading amateur game development forum and Discord server. All are welcome, and amongst our ranks you will find experts in their field from all aspects of video game design and development.

I have a request! For when your party dies..

Kraft

Sponsor

Okay, to be as short and as simple as I can,

I would like a script that makes it so that when the party dies in a battle or something, instead of going straight to gameover screen, it runs a common event. (like common event #001 or something)

This would help me, and I assume a lot of other people who want to teleport to an inn or something when you die, or have some options come up on the screen, or whatever, you just set what you want the game to do in the common event.

I know that there is a script made already that teleports a hero to an inn, but I think that this would be easier for what I have in mind.

also, non-sdk please.

Thank you!

Kraft
 
I can't really help you, but i have some advice: get the boss battles ready for this. What you do is you put in a continue even when loser command. where it says if lose, you trsnfer to a map stored in a variable. (the inn) The map becomes stored when, say, you pass over an event at the bed, storing the map id.
you may be able to use this for all battles, if you don't use random battles.
 
Insert new script:

Code:
class Scene_Battle
  
  alias jat_NoGameOver_old_judge judge

  def judge
    jat_NoGameOver_old_judge
    if $game_temp.gameover and not $game_temp.battle_can_lose
      $game_temp.gameover = false
      common_event = [COLOR=Red]$data_common_events[1][/COLOR]
      $game_system.battle_interpreter.setup(common_event.list, 0)
    end
  end
  
end

Change the integer in highlighted word above to the Common Event ID# you want to call. This works for both random battles and called battles from events (without custom Defeat case).
 

Thank you for viewing

HBGames is a leading amateur video game development forum and Discord server open to all ability levels. Feel free to have a nosey around!

Discord

Join our growing and active Discord server to discuss all aspects of game making in a relaxed environment. Join Us

Content

  • Our Games
  • Games in Development
  • Emoji by Twemoji.
    Top