Death Switch
#1
Death Switch
Version 1.3
By Vash
Aug 27 2006

This is a locked, single-post thread from Creation Asylum. Archived here to prevent its loss.
No support is given. If you are the owner of the thread, please contact administration.


Description:
You know how when the "lead" (front) character dies? I thought it was silly for the sprite on the map to still be displaying the "lead character that was dead so...
- When lead player dies the sprite on the map switchs to the next person in line thats alive.
- When you switch a character around the map sprite is updated. Best with: RPG Advocate's Changing Party Order.
- (By DerVV: It's Yargovich's script, not RPG Advocate. RPG Advocate just had it on his own website.)

Screenshots/Demo:
Not Needed

Note: Hoped I used alias correctly...

Instructions:
- Paste it over main.

Code:
#==============================================================================
# ** Game_Player (Death Switch)
#------------------------------------------------------------------------------
# By Vash (or rmxp.org)
# Posted on: 27.8.06
# Updated on: 4.9.06
# Version 1.3
# Description:
# - When the lead player dies the sprite on the map switchs to the next person
#   in line thats alive.
# - When you switch a character around the map sprite is updated.
#==============================================================================

class Game_Player < Game_Character
alias vash_tos_switch_refresh refresh
  def refresh
   vash_tos_switch_refresh
#------------------------------------------------------------------------------
# If lead character is dead
#------------------------------------------------------------------------------
  for actor in $game_party.actors
   lead = actor unless actor.hp == 0    
   break unless lead.nil?
end
#------------------------------------------------------------------------------
    @character_name = lead.character_name
    @character_hue = lead.character_hue
    @opacity = 255
    @blend_type = 0
  end
end

class Game_Player < Game_Character
alias vash_tos_switch_update update
  def update
   vash_tos_switch_update
#------------------------------------------------------------------------------
# If lead character is dead
#------------------------------------------------------------------------------
for actor in $game_party.actors
   lead = actor unless actor.hp == 0
   break unless lead.nil?
end
#------------------------------------------------------------------------------
# If all characters are dead
#------------------------------------------------------------------------------
  if $game_party.all_dead? or $game_party.actors.size == 0
    $scene = Scene_Gameover.new
      return
    end
   $game_temp.gameover unless !lead.nil?
   @character_name = lead.character_name
   @character_hue = lead.character_hue
end
end
}


Possibly Related Threads…
Thread Author Replies Views Last Post
  Friend Death Status sandsand 0 3,348 10-10-2006, 01:00 PM
Last Post: sandsand
  Before Battle Switch Sheol 0 2,666 04-20-2006, 01:00 PM
Last Post: Sheol



Users browsing this thread: 1 Guest(s)