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.

Game over help

Hey, I was wondering if anyone could help me with my gameover script.

I've tried to bash somthing together but it keeps giving me an error when my party bites the dust (I have limited programing experince, so I know when to check if there is an end missing. There isn't)

My goal was to have it when you die to have you teleported to "heaven".

I tried to tell it simply to teleport you. Didn't work, I thought "Hey, I probablly have to get you out of battle first". Didn't work. I thought "Hey, I probablly have to restore your health first". Didn't work.

Could somone put me out of my missery?
 
Ah? No?

No, I hacked up the gameover script to do that. I want to, instead of ending the game when you get a "gameover" to teleport you

Code:
#==============================================================================
# ** Scene_Gameover
#------------------------------------------------------------------------------
#  This class performs game over screen processing.
#==============================================================================

class Scene_Gameover
  #--------------------------------------------------------------------------
  # * Main Processing
  #--------------------------------------------------------------------------
  def main
    # Set battle abort flag
    actor.recover_all
    $game_temp.battle_abort = true
    # Advance index
    @index += 1
    # End
    return false
   end
  end

That's my Frankenstein monster right there. Does the game not allow for such a change?
 
Hmmm, Maybe I don't need to edit the gameover script. Maybe I need to edit the battle script?

I've tried experimenting with making:

battle_can_lose = true

In the accual fight script and in the game temp and ... arg
 
Try this where you want it to be executed:
Code:
$game_map.setup([color=red]id[/color])
$game_player.moveto([color=red]x[/color], [color=red]y[/color])
$scene = Scene_Map.new
 

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