RMRK is retiring.
Server is paid up for the rest of 2026, but the forum may go after that. See here for more information. Please archive or save anything you would like to keep before 2027.
Main Menu
  • Welcome to The RPG Maker Resource Kit.

Different Ways to Die

Started by epson777341, May 09, 2009, 04:53:51 PM

0 Members and 1 Guest are viewing this topic.

epson777341

This script was made for me by BigEd781 of RMVX.net
It makes so when a certain status effect happens to allof your party members, it's game over.

Like Petrify in Final Fantasy.

module ExtendedDeath
 
  # add the id numbers of the states taht should cause a gameover
  # if the entire party is inflicted
  STATE_IDS = [ 7, 8 ]
 
end

class Game_Party < Game_Unit
 
  def all_affected?(state_id)
    all_inflicted = true
    for actor in self.members   
      all_inflicted = false unless actor.state?(state_id)
    end
    return all_inflicted
  end
 
end

class Scene_Battle

  def check_status
    for id in ExtendedDeath::STATE_IDS
      call_gameover if $game_party.all_affected?(id)
    end
  end
 
  alias :eds_pre_death_process_action :process_action
  def process_action
    check_status
    eds_pre_death_process_action
  end 
 
end


There Aren't really any screenshots I can show with this script.


Grafikal

This is pretty neat. Thanks for sharing :)

Darkrai1276

i was wondering if it could be used if there's two different states on the different characters but they still count as a game over
e.g. petrify and x-zone on two different people but it still counts as a game over

The last supper, depicted as said in the pokebible