Save-Point
Party Deleting System - Printable Version

+- Save-Point (https://www.save-point.org)
+-- Forum: Archives (https://www.save-point.org/forum-105.html)
+--- Forum: Creation Asylum Archives (https://www.save-point.org/forum-90.html)
+---- Forum: Scripts & Code Snippets (https://www.save-point.org/forum-92.html)
+----- Forum: RPG Maker XP Code (https://www.save-point.org/forum-93.html)
+------ Forum: Custom Component System (CCS) (https://www.save-point.org/forum-97.html)
+------ Thread: Party Deleting System (/thread-6438.html)



Party Deleting System - Ekhart - 07-05-2007

Party Deleting System
Ekhart
Jul 5, 2007


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.


Hi! I want to show you my first script: The party deleting script!

Code:
#--------------------------------------------------------------------------------
#---------- Party Deleting system
#---------- By Trix
#--------------------------------------------------------------------------------
#---------- Call Script:
#---------- $scene = Scene_Delete.new
#--------------------------------------------------------------------------------
#---------- Credits for Trixa i Ferredingu
#--------------------------------------------------------------------------------


class Scene_Delete
  
  

  def main
    @spriteset = Spriteset_Map.new
    @postacie = []
    for i in 1...$game_party.actors.size
    @postacie << $game_party.actors[i].name
    end
    if @postacie == []
      @postacie << "Nie ma już kogo usunąć"
      end
    @command_window = Window_Command.new(192, @postacie)
    @command_window.x = 0
    @command_window.y = 0
    Audio.me_stop
    Audio.bgs_stop
    Graphics.transition
    loop do
      Graphics.update
      Input.update
      update
      if $scene != self
        break
      end
    end
    Graphics.freeze
    @command_window.dispose
    @spriteset.dispose
  end
  
  
  def update
    @command_window.update
    @spriteset.update
    if $game_party.actors.size > 1
    if Input.trigger?(Input::C)
      case @command_window.index
      when 0  #Actor 2
        command_a1
      when 1  #Actor 3
        command_a2
      when 2  #Actor 4
        command_a3
      end
    end
  end
  if $game_party.actors.size == 1
    if Input.trigger?(Input::C)
      $scene = Scene_Map.new
    end
    end
    end
    
    def command_a1
      @actor = $game_party.actors[1].id
      $game_party.remove_actor(@actor)
      $scene = Scene_Map.new
    end
    
    def command_a2
      @actor = $game_party.actors[2].id
      $game_party.remove_actor(@actor)
      $scene = Scene_Map.new
    end
    
    def command_a3
      @actor = $game_party.actors[3].id
      $game_party.remove_actor(@actor)
      $scene = Scene_Map.new
    end
end

And screen:
[Image: c520a40b56a5fc8e.png]