I'd like this script to be edited please
What i'd like, before it asks you if you want to learn the skills, it asks what party member you'd like to learn the skill
So it brings up a window in the middle of the screen which has the following options
Party Member 1's Name
Party Member 2's Name (If there is a second one)
Party Member 3's Name (If there is a third one)
Party Member 4's Name (If there is a fourth one)
All
If the player selects the first one, the first party member gains the skill, same with 2,3 and 4. If they select all, then all of them gain that skill
After they have selected the member, it then asks if your sure you want them to learn it
Thank you to anyone who helps. If you need more info let me know
Code:
#==============================================================================
# ** Module Skills
#==============================================================================
module Skills
# Just include the Skillss you want to have in the array, they'll be displayed
# in the order you place them in the array
Database_Skills = ["Fire"]
# The Switches are assigned to the actors in the array, means the first
# variable in the array is assigned to the first actor in the Database_Skills array
Switches = [8]
# ID of the maps that are teleported to
Skills = [3]
# Text that shows up if you want to release a Skills
Release = "Are you sure you wish to learn this Skill?"
# Text that shows up if a character / Skills is not available
Not_Available = "Not Available"
end
#==============================================================================
# ** Scene_Release
#==============================================================================
class Scene_Skill_Gain
#--------------------------------------------------------------------------
# * Main Processing
#--------------------------------------------------------------------------
def main
@skill_left = Window_skill_Left.new
@dummy_window = Window_Base.new(170, 129, 400, 64)
@dummy_window.contents = Bitmap.new(@dummy_window.width - 32, @dummy_window.height - 32)
@dummy_window.contents.draw_text(4, 0, 360, 32, Skills::Release)
@command_window = Window_Command.new(160,["Yes", "No"])
@command_window.active = false
@command_window.visible = false
@command_window.x = 320 - @command_window.width / 2
@command_window.y = 240 - @command_window.height / 2
@command_window.z = 150
@dummy_window.z = 150
@dummy_window.visible = false
# Make sprite set
@spriteset = Spriteset_Map.new
refresh
# Execute transition
Graphics.transition
# Main loop
loop do
# Update game screen
Graphics.update
# Update input information
Input.update
# Frame update
update
# Abort loop if screen is changed
if $scene != self
break
end
end
# Prepare for transition
Graphics.freeze
# Dispose of windows
@skill_left.dispose
@command_window.dispose
@dummy_window.dispose
# Dispose of sprite set
@spriteset.dispose
end
#--------------------------------------------------------------------------
# * Refresh
#--------------------------------------------------------------------------
def refresh
if @old_index != @skill_left.index
@old_index = @skill_left.index
end
end
#--------------------------------------------------------------------------
# * Frame Update
#--------------------------------------------------------------------------
def update
@command_window.update
@skill_left.update
refresh
if @skill_left.active
skill_update
elsif @command_window.active
command_update
end
end
#--------------------------------------------------------------------------
# * Frame Update (when skill window is active)
#--------------------------------------------------------------------------
def skill_update
if Input.trigger?(Input::B)
# Play cancel SE
$game_system.se_play($data_system.cancel_se)
# Switch to Map screen
$scene = Scene_Map.new
return
end
if Input.trigger?(Input::C)
if $game_switches[Skills::Switches[@skill_left.index]] != true
# Play buzzer SE
$game_system.se_play($data_system.buzzer_se)
return
end
$game_system.se_play($data_system.decision_se)
@skill_left.active = false
@command_window.active = true
@command_window.visible = true
@dummy_window.visible = true
@command_window.index = 0
return
end
end
#--------------------------------------------------------------------------
# * Frame Update (when command window is active)
#--------------------------------------------------------------------------
def command_update
if Input.trigger?(Input::B)
# Play cancel SE
$game_system.se_play($data_system.cancel_se)
@skill_left.active = true
@command_window.active = false
@command_window.visible = false
@dummy_window.visible = false
@command_window.index = 0
return
end
if Input.trigger?(Input::C)
# Play decision SE
$game_system.se_play($data_system.decision_se)
case @command_window.index
when 1
@skill_left.active = true
@command_window.active = false
@command_window.visible = false
@dummy_window.visible = false
@command_window.index = 0
when 0
#Learn Skills
id = Skills::Skills[@skill_left.index]
$game_party.actors[0].learn_skill(id)
$scene = Scene_Map.new
$game_map.autoplay
end
end
end
end
#==============================================================================
# * Window_skill_Left
#==============================================================================
class Window_skill_Left < Window_Selectable
#--------------------------------------------------------------------------
# * Object Initialization
#--------------------------------------------------------------------------
def initialize
super(215, 0, 210, 480)
self.contents = Bitmap.new(width - 32, height - 32)
@index = 0
@item_max = Skills::Database_Skills.size
refresh
end
#--------------------------------------------------------------------------
# * Refresh
#--------------------------------------------------------------------------
def refresh
self.contents.clear
self.contents.font.color = Color.new(0, 0, 0)
self.contents.draw_text(3, 1, 150, 32, "Realm Name:")
self.contents.draw_text(5, -1, 150, 32, "Realm Name:")
self.contents.draw_text(3, -1, 150, 32, "Realm Name:")
self.contents.draw_text(5, 1, 150, 32, "Realm Name:")
self.contents.font.color = normal_color
self.contents.draw_text(4, 0, 150, 32, "Realm Name:")
for i in 0...Skills::Database_Skills.size
y = i * 32
@name = $game_switches[Skills::Switches[i]] == true ? Skills::Database_Skills[i] : Skills::Not_Available
self.contents.draw_text(4, y + 32, 150, 32, "#{@name}")
end
end
#--------------------------------------------------------------------------
# * Cursor Rectangle Update
#--------------------------------------------------------------------------
def update_cursor_rect
self.cursor_rect.set(0, @index * 32 + 32, self.width - 32, 32)
end
end
What i'd like, before it asks you if you want to learn the skills, it asks what party member you'd like to learn the skill
So it brings up a window in the middle of the screen which has the following options
Party Member 1's Name
Party Member 2's Name (If there is a second one)
Party Member 3's Name (If there is a third one)
Party Member 4's Name (If there is a fourth one)
All
If the player selects the first one, the first party member gains the skill, same with 2,3 and 4. If they select all, then all of them gain that skill
After they have selected the member, it then asks if your sure you want them to learn it
Thank you to anyone who helps. If you need more info let me know