Jump to content
New account registrations are disabed. This website is now an archive. Read more here.
Sign in to follow this  
Faellin

gameover when main hero dies script...

Recommended Posts

I have been trying to find a script where if your main hero dies its gameover. something like what you see in the fire emblem games. I would make this myself but I am one of the worst script writers you can imagine... I would be greatly appreciative if anyone could point me in a proper direction for a script like this.

Share this post


Link to post
Share on other sites

First before someone can help you, you need to specify what system your using XP or VX.

Share this post


Link to post
Share on other sites

Kell might be able to help. Might be harder to do if you are using a different battle system.

 

First before someone can help you, you need to specify what system your using XP or VX.

For XP. Look in the upper left of the 1st post :P

Share this post


Link to post
Share on other sites

For XP. Look in the upper left of the 1st post :P

 

Ops, *turns around and walks away pretending he didn't say anything* :sweatdrop:

Share this post


Link to post
Share on other sites

Hey, hope this works for you! I'm not entirely sure if this is what you were looking for because the script is much shorter than I thought it would be, but anyway all customization is at the top and instructions are in the comments :)

 

#==============================================================================
# Title: Main Character Gameover
# Version: 1.0
# Author: The Law G14
#==============================================================================


# If this is set to true, then when your main actor dies you recieve a gameover
MC_GAMEOVER = true
# ID of the Main Character, this number must be greater than 0
MC_ID = 1

#==============================================================================
# ** Game_Party
#------------------------------------------------------------------------------
#  This class handles the party. It includes information on amount of gold 
#  and items. Refer to "$game_party" for the instance of this class.
#==============================================================================

class Game_Party
 #--------------------------------------------------------------------------
 # * Alias Listing
 #--------------------------------------------------------------------------
 alias law_mc_gameover_game_party_all_dead all_dead?
 #--------------------------------------------------------------------------
 # * Determine Everyone is Dead [EDITED BASED ON CUSTOMIZATION]
 #--------------------------------------------------------------------------
 def all_dead?
   # Call original Method
   law_mc_gameover_game_party_all_dead
   # Return true if main actor is dead
   return true if $game_actors[MC_ID].hp == 0 && MC_GAMEOVER      
 end
end


#==============================================================================
# 
# *** END OF SCRIPT ***
#
#==============================================================================

Edited by TheLaw

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...