07-05-2007, 01:00 PM
Party Deleting System
Ekhart
Jul 5, 2007
Hi! I want to show you my first script: The party deleting script!
And screen:
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.
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: