Help with Gameover script

Farlon303

Warper
Member
Joined
May 27, 2014
Messages
1
Reaction score
0
First Language
English
Primarily Uses
I wanted to use a script where after the game over screen the player wouldn't be transported to the title but the last town they visited.

This script here works in VX but not in VXAce. I'm not very good with scripting here so I was wondering if anyone knew how to get this to work in VXAce? 

It was written by GubiD I think.

Code:
module DQ_Save  #---------------------------------------------------------------------------  # Church Maps - An Array of all MAP_ID's that are 'churches'  #---------------------------------------------------------------------------  Church_Maps = [1]  #---------------------------------------------------------------------------  # Spawn Text - Text used to locate which event on map is the 'spawn' used  #    when reviving or teleporting to a church.   #---------------------------------------------------------------------------  Spawn_Text = "CHURCH_SPAWN"  #---------------------------------------------------------------------------  # Teleport Animation ID - Animation ID to be played when you 'Teleport'  #---------------------------------------------------------------------------  Teleport_Animation_ID = 41  #---------------------------------------------------------------------------  # Poisen State - State ID from the Database that is 'poisen'  #---------------------------------------------------------------------------  Poisen_State = 2  #---------------------------------------------------------------------------  # Curse State - State ID from the database that is 'curse'  #---------------------------------------------------------------------------  Curse_State = 3end#---------------------------------------------------------------------------# Game Player - Edits for DQ Save system#---------------------------------------------------------------------------class Game_Player < Game_Character  #--------------------------------------------------------------------------  # * Execute Player Transfer - edited to set 'last visited' and store 'visited' list.  #--------------------------------------------------------------------------  alias gm_plyr_perf_transfer_DQ_Save perform_transfer unless $@  def perform_transfer    if @transferring and DQ_Save::Church_Maps.include?(@new_map_id)      @last_visited_church = @new_map_id      visited_list(@new_map_id)    end    gm_plyr_perf_transfer_DQ_Save   end  #---------------------------------------------------------------------------  # Last Church - returns the last church that was visited  #---------------------------------------------------------------------------  def last_church    if @last_visited_church != nil      return @last_visited_church    end    return nil  end  #---------------------------------------------------------------------------   # Visited List - Returns a list of all the visited churches  #---------------------------------------------------------------------------  def visited_list(id=nil)    @visit_list = [] if @visit_list == nil    if id == nil      return @visit_list    else      @visit_list << id unless @visit_list.include?(id)      @visit_list.sort!      return @visit_list    end    endend#---------------------------------------------------------------------------# Game Map - Edits for the DQ Save system#---------------------------------------------------------------------------class Game_Map  #---------------------------------------------------------------------------  # Find DQ Spawn - sets the player position to the 'church spawn', used via  #    event comment of 'SPAWN_TEXT' defined in the DQ_Save module  #---------------------------------------------------------------------------  def find_dq_spawn    for event in @events.values      for cmd in event.list        if cmd.code ==108 and cmd.parameters[0].include?(DQ_Save::Spawn_Text)          $game_player.moveto(event.x, event.y)        end      end    end  endend#---------------------------------------------------------------------------# Scene Gameover - Edits for the DQ Save system#---------------------------------------------------------------------------class Scene_Gameover < Scene_Base  #--------------------------------------------------------------------------  # Update - Edited to restore play to 'last visited church' when available  #--------------------------------------------------------------------------  alias scn_gm_ovr_DQ_Save_update update unless $@  def update    if Input.trigger?(Input::C)      if $game_player.last_church != nil        $game_map.setup($game_player.last_church)        $game_map.find_dq_spawn        Graphics.fadeout(120)        $game_map.autoplay        $scene = Scene_Map.new        return       end    end    scn_gm_ovr_DQ_Save_update  endend#---------------------------------------------------------------------------# Map Info Load - Loads the map data if it has not already been done. #---------------------------------------------------------------------------$map_info = load_data("Data/MapInfos.rvdata2")
 

nio kasgami

VampCat
Veteran
Joined
May 21, 2013
Messages
8,949
Reaction score
3,042
First Language
French
Primarily Uses
RMMV
Rare  are the vx script who work in vx ace but is simple to edit and you input a variable serie for this
 

Uzuki

Kawaii on the streets, Senpai in the sheets
Veteran
Joined
Aug 18, 2012
Messages
1,933
Reaction score
1,326
First Language
English
Primarily Uses
RMMV
Well I don't know of any scripts for Ace that doe's that but I do have a method that I use with Yanfly's Death Common Event script:

1st. Download script odviously: https://github.com/Archeia/YEARepo/tree/master/Battle

2nd. I'm going to assume you already know how you install scripts so we're going directly to the next step. In the script there's going to be a section to ask what event will run when the party gets wiped out. For the sake of this tutorial let's say 5.

3rd. Now go to the fifth Common Event and make this set up: Text box of player being wipe out, remove death state, abort battle, fadeout screen, and a switch that activates another common event, for now let's say the sixth common event.

4th. On the 6th common event make it so that it will autorun when the player wipes out switch activates. In it you're going to make even more switches and common events. The switches will be activated when the player enters a specific location. 

Note: Ignore the gold variables. That's just me being a douche to the players :3

Now you just set up the switches to be activated when they enter a specific location.

If you have any questions let me know.
 

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Profile Posts

How many parameters is 'too many'??
Yay, now back in action Happy Christmas time, coming back!






Back in action to develop the indie game that has been long overdue... Final Fallacy. A game that keeps on giving! The development never ends as the developer thinks to be the smart cookie by coming back and beginning by saying... "Oh bother, this indie game has been long overdue..." How could one resist such? No-one c
So I was playing with filters and this looked interesting...

Versus the normal look...

Kind of gives a very different feel. :LZSexcite:
To whom ever person or persons who re-did the DS/DS+ asset packs for MV (as in, they are all 48x48, and not just x2 the pixel scale) .... THANK-YOU!!!!!!!!! XwwwwX

Forum statistics

Threads
105,853
Messages
1,016,990
Members
137,562
Latest member
tamedeathman
Top