查看: 3083|回复: 2

[已经解决] 如何把角色通過呼喚脚本放進倉庫

[复制链接]
梦石
0
星屑
4410
在线时间
204 小时
注册时间
2018-6-17
回帖
112
发表于 2019-3-15 17:17:50 | 显示全部楼层 |阅读模式

加入我们,或者,欢迎回来。

您需要 登录 才可以下载或查看,没有账号?注册会员

×
本帖最后由 VIPArcher 于 2022-5-31 08:50 编辑

我想製作一個事件,勝利之後,xxx入隊,這角色不是入隊,而是直接存進倉庫。

我所使用的角色倉庫脚本:
  1. #------------------------------------------------------------------------------#
  2. #  人物仓库
  3. #------------------------------------------------------------------------------#
  4. #  适用: RPGMAKER VX ACE
  5. #  版本: 1.1
  6. #  作者:66RPG的tan12345
  7. #-------------------------------------------------------------------------------
  8. #  人物仓库,也可以理解为宠物仓库,可以将角色从队伍存入到仓库。
  9. #  本脚本大量参考了Galv's的Army Manager脚本,界面的绘制可以说是直接参照着
  10. #  Galv's的Army Manager来绘制的。
  11. #  使用方法:将脚本插入至main以上
  12. #  呼出时,请调用:SceneManager.call(Scene_Party2)
  13. #-------------------------------------------------------------------------------
  14. module PARTY2
  15.   #设定命令,可以自行加入
  16.   CMDS = {
  17.   #命令ID,队伍显示的命令,执行内容,显示图标
  18.   :sw       => ["切换编所","切换队伍",     :sw,          187],
  19.   :status   => ["查看状态","查看状态",     :SPS_s,236],
  20.   :skill    => ["查看技能","查看技能",     :Scene_Party2_Skill, 236],
  21.   :in_out   => ["武将休息","武将参战",     :in_out,      187],
  22.   :dismiss  => ["武将解雇","武将解雇",     :dismiss,     187],
  23.   }
  24.   #不能存入仓库的角色ID
  25.   NO_INPARTY2 = [1]
  26.   #不能放生的角色ID
  27.   NO_DISMISS = [1]
  28.   #仓库最大限制
  29.   PARTY2MAX = 999
  30.   #队伍人数最大限制
  31.   PARTY1MAX = 10
  32. end

  33. module SceneManager
  34.   def self.party2call(scene_class)
  35.     @stack.push(@scene)
  36.     [url=home.php?mod=space&uid=420706]@Scene[/url] = Kernel.const_get(scene_class).new
  37.   end
  38. end

  39. class Game_Party < Game_Unit
  40.   attr_accessor :last_party1
  41.   attr_accessor :last_party2
  42.   attr_accessor :party2
  43.   attr_accessor :inparty
  44.   
  45.   alias tan_party2_initialize initialize
  46.   def initialize
  47.     tan_party2_initialize
  48.     #@last_party1 = nil
  49.     #@last_party2 = nil
  50.     @party2 = []
  51.     @inparty = true
  52.   end
  53.   #--------------------------------------------------------------------------
  54.   # ● 加入仓库
  55.   #--------------------------------------------------------------------------
  56.   def party2_add_actor(actor_id)
  57.     @party2.push(actor_id) unless @party2.include?(actor_id)
  58.   end
  59.   #--------------------------------------------------------------------------
  60.   # ● 从仓库取出
  61.   #--------------------------------------------------------------------------
  62.   def party2_remove_actor(actor_id,a = false)
  63.     if a#清除数据
  64.       @party2.delete(actor_id)
  65.       $data_actors[actor_id] = nil
  66.     else#普通取出
  67.       @party2.delete(actor_id)
  68.     end
  69.   end
  70.   #--------------------------------------------------------------------------
  71.   # ● 获取仓库所有成员
  72.   #--------------------------------------------------------------------------
  73.   def party2_all_members
  74.     @party2.collect {|id| $game_actors[id] }
  75.   end
  76. end
  77. class SPS_s < Scene_Status
  78.   #--------------------------------------------------------------------------
  79.   # ● Execute Setup
  80.   #--------------------------------------------------------------------------        
  81.   def execute_setup
  82.     if $game_party.inparty == true
  83.      @actor_old = @actor = $game_party.last_party1
  84.     else
  85.      @actor_old = @actor = $game_party.last_party2
  86.     end
  87.     @phase = 0
  88.     create_sprites
  89.   end
  90. end  
  91. #--------------------------------------------------------------------------
  92. # ● 总界面
  93. #--------------------------------------------------------------------------
  94. class Scene_Party2 < Scene_MenuBase
  95.   #--------------------------------------------------------------------------
  96.   # ● 创建窗口
  97.   #--------------------------------------------------------------------------
  98.   def start
  99.     super
  100.     create_party1_window
  101.     create_party2_window
  102.     create_command_window
  103.     create_face_window
  104.   end
  105.   #--------------------------------------------------------------------------
  106.   # ● 队伍窗口设定
  107.   #--------------------------------------------------------------------------
  108.   def create_party1_window
  109.     ww = Graphics.width / 5 * 2
  110.     wh = Graphics.height
  111.     @party1_window = Window_Party1.new(0,0,ww,wh)
  112.     @party1_window.viewport = @viewport
  113.     @party1_window.activate if $game_party.inparty == true
  114.     @party1_window.set_handler(:ok, method(:on_party1_ok))
  115.     @party1_window.set_handler(:cancel, method(:return_scene1))
  116.   end
  117.   #--------------------------------------------------------------------------
  118.   # ● 仓库窗口设定
  119.   #--------------------------------------------------------------------------
  120.   def create_party2_window
  121.     wx = Graphics.width / 5 * 2
  122.     ww = Graphics.width / 5 * 3
  123.     wh = Graphics.height
  124.     @party2_window = Window_Party2.new(wx,0,ww,wh)
  125.     @party2_window.viewport = @viewport
  126.     @party2_window.activate if $game_party.inparty == false
  127.     @party2_window.set_handler(:ok, method(:on_party2_ok))
  128.     @party2_window.set_handler(:cancel, method(:return_scene2))
  129.   end
  130.   #--------------------------------------------------------------------------
  131.   # ● 命令窗口设定
  132.   #--------------------------------------------------------------------------
  133.   def create_command_window
  134.     wx = Graphics.width / 2
  135.     wy = Graphics.height / 2
  136.     @command_window = Window_Party2Command.new(wx + 10,wy)
  137.     @command_window.viewport = @viewport
  138.     PARTY2::CMDS.each { |cmd|
  139.       handle = cmd[1][2]#.delete(' ').downcase.to_sym
  140.       @command_window.set_handler(handle, method(:cmd))
  141.     }
  142.     @command_window.set_handler(:cancel, method(:back_to_myscene))
  143.     @command_window.y -= @command_window.height
  144.     @command_window.hide.deactivate
  145.   end
  146.   #--------------------------------------------------------------------------
  147.   # ● 脸图窗口设定
  148.   #--------------------------------------------------------------------------
  149.   def create_face_window
  150.     ww = @command_window.width
  151.     wh = @command_window.height
  152.     wx = @command_window.x
  153.     wy = @command_window.y
  154.     @face_window = Window_Party2Face.new(wx,wy,ww,wh)
  155.     @face_window.viewport = @viewport
  156.     @face_window.hide
  157.   end
  158.   #--------------------------------------------------------------------------
  159.   # ● 命令窗口命令初始化
  160.   #--------------------------------------------------------------------------
  161.   def cmd
  162.     list = PARTY2::CMDS.to_a
  163.     cmd = @command_window.index
  164.     symbol = list[cmd][1][2]
  165.     if custom_action(symbol)
  166.       custom_on_command_ok(symbol)
  167.     else
  168.       SceneManager.party2call(list[cmd][1][2])
  169.     end
  170.   end
  171.   
  172.   def custom_action(symbol)
  173.     case symbol
  174.     when :dismiss,:sw,:in_out
  175.       return true
  176.     else
  177.       return false
  178.     end
  179.   end
  180.   
  181.   def custom_on_command_ok(symbol)
  182.     case symbol
  183.     when :dismiss
  184.       do_dismiss
  185.     when :sw
  186.       do_sw
  187.     when :in_out
  188.       do_in_out
  189.     end
  190.   end

  191.   def terminate
  192.     super
  193.   end
  194.   
  195.   def update
  196.     super
  197.   end
  198.   
  199.   #--------------------------------------------------------------------------
  200.   # ● 队伍窗口:确定
  201.   #--------------------------------------------------------------------------
  202.   def on_party1_ok
  203.     $game_party.last_party1 = @party1_window.select_actor
  204.     @command_window.refresh
  205.     @face_window.refresh
  206.     @command_window.show.activate
  207.     @face_window.show.activate
  208.   end
  209.   #--------------------------------------------------------------------------
  210.   # ● 队伍窗口:取消
  211.   #--------------------------------------------------------------------------
  212.   def return_scene1
  213.     $game_party.last_party1 = nil
  214.     $game_party.last_party2 = nil
  215.     $game_party.inparty = true
  216.     SceneManager.return
  217.   end
  218.   #--------------------------------------------------------------------------
  219.   # ● 仓库窗口:确定
  220.   #--------------------------------------------------------------------------
  221.   def on_party2_ok
  222.     $game_party.last_party2 = @party2_window.select_actor
  223.     @command_window.refresh
  224.     @face_window.refresh
  225.     @command_window.show.activate
  226.     @face_window.show.activate
  227.   end
  228.   #--------------------------------------------------------------------------
  229.   # ● 仓库窗口:取消
  230.   #--------------------------------------------------------------------------
  231.   def return_scene2
  232.     do_sw
  233.   end
  234.   #--------------------------------------------------------------------------
  235.   # ● 命令窗口:取消
  236.   #--------------------------------------------------------------------------
  237.   def back_to_myscene
  238.     @command_window.hide.deactivate
  239.     @face_window.hide
  240.     if $game_party.inparty == true
  241.       @party1_window.activate
  242.     else
  243.       @party2_window.activate
  244.     end
  245.   end
  246.   #--------------------------------------------------------------------------
  247.   # ● 命令窗口:切换
  248.   #--------------------------------------------------------------------------
  249.   def do_sw
  250.     if $game_party.inparty == true
  251.       $game_party.inparty = false
  252.       @command_window.hide.deactivate
  253.       @face_window.hide
  254.       @party2_window.activate
  255.     else
  256.       $game_party.inparty = true
  257.       @command_window.hide.deactivate
  258.       @face_window.hide
  259.       @party1_window.activate
  260.     end
  261.   end
  262.   #--------------------------------------------------------------------------
  263.   # ● 命令窗口:存入、取出
  264.   #--------------------------------------------------------------------------
  265.   def do_in_out
  266.     if $game_party.inparty == true
  267.       #存入仓库
  268.       $game_party.party2_add_actor(@party1_window.select_actor.id)
  269.       $game_party.remove_actor(@party1_window.select_actor.id)
  270.       @command_window.hide.deactivate
  271.       @face_window.hide
  272.       @party1_window.refresh
  273.       @party2_window.refresh
  274.       @party1_window.activate
  275.     else
  276.       #取出
  277.       $game_party.add_actor(@party2_window.select_actor.id)
  278.       $game_party.party2_remove_actor(@party2_window.select_actor.id)
  279.       if $game_party.party2_all_members.count <= 0
  280.         @party1_window.refresh
  281.         @party2_window.refresh
  282.         do_sw
  283.       else
  284.         @command_window.hide.deactivate
  285.         @face_window.hide
  286.         @party1_window.refresh
  287.         @party2_window.refresh
  288.         @party2_window.activate
  289.       end
  290.     end
  291.   end
  292.   #--------------------------------------------------------------------------
  293.   # ● 命令窗口:放生
  294.   #--------------------------------------------------------------------------
  295.   def do_dismiss
  296.     if $game_party.inparty == true
  297.       $game_party.tan_remove_actor(@party1_window.select_actor.id,true)
  298.       @command_window.hide.deactivate
  299.       @face_window.hide
  300.       @party1_window.refresh
  301.       @party1_window.activate
  302.     else
  303.       $game_party.party2_remove_actor(@party2_window.select_actor.id,true)
  304.       @command_window.hide.deactivate
  305.       @face_window.hide
  306.       @party2_window.refresh
  307.       @party2_window.activate
  308.     end
  309.   end
  310. end
  311. #--------------------------------------------------------------------------
  312. # ● 队伍窗口
  313. #--------------------------------------------------------------------------
  314. class Window_Party1 < Window_Selectable
  315.   def initialize(x, y, width, height)
  316.     super(x, y, width, height)
  317.     @data = []
  318.     @last_index ||= 0
  319.     @animtime = 0
  320.     @walk = 0
  321.     refresh
  322.     select_last
  323.   end
  324.   
  325.   def item_width
  326.     (width - standard_padding * 2 + spacing) / col_max - spacing
  327.   end
  328.   def item_height; item_width; end
  329.   def spacing; return 1; end
  330.   def col_max; return 2; end
  331.   def item_max; @data ? @data.size : 1; end
  332.   def select_actor; @data && index >= 0 ? @data[index] : nil; end
  333.   
  334.   def current_item_enabled?
  335.     enable?(@data[index])
  336.   end
  337.   def enable?(actor)
  338.     return false if !actor
  339.     return true
  340.   end
  341.   
  342.   def include?(actor)
  343.     return false if actor.nil?
  344.     return true
  345.   end
  346.   
  347.   def make_item_list
  348.     @data = $game_party.members.select {|actor| include?(actor) }
  349.     @data.push(nil) if include?(nil)
  350.   end
  351.   
  352.   def select_last
  353.     select(@data.index($game_party.last_party1) || 0)
  354.   end
  355.   
  356.   def actor_rect(index)
  357.     rect = Rect.new
  358.     rect.width = item_width
  359.     rect.height = item_height
  360.     rect.x = index % col_max * (item_width + spacing)
  361.     rect.y = index / col_max * item_height
  362.     rect
  363.   end
  364.   
  365.   def offset
  366.     Graphics.height < 480 ? 0 : 10
  367.   end
  368.   
  369.   def draw_item(index)
  370.     actor = @data[index]
  371.     if actor
  372.       rect = actor_rect(index)
  373.       rect.width -= 4
  374.       draw_actor_text(actor,rect.x + 2,rect.y + 38 + offset, enable?(actor),
  375.         rect.width)
  376.       draw_character(actor.character_name, actor.character_index,
  377.         rect.x + item_width / 1.6 - 1, rect.y + 38 + offset,
  378.         enable?(actor),index)
  379.     end
  380.   end
  381.   
  382.   def draw_actor_text(actor, x, y, enabled = true, w)
  383.     return unless actor
  384.     #icon1 = get_icon(:actor,actor)
  385.     #icon2 = get_icon(:weapon,actor)
  386.     #draw_icon(icon1, x + 6, y - 20, enabled)
  387.     #draw_icon(icon2, x + 6, y - 20, enabled)
  388.     change_color(normal_color, enabled)
  389.     contents.font.size = 18
  390.     draw_text(x, y, w, line_height, actor.name,1)
  391.     contents.font.size = 16
  392.     lvl = Vocab::level_a + actor.level.to_s
  393.     cname = actor.class.name
  394.     draw_text(x + 10, y - 40, w, line_height, lvl,0)
  395.     draw_text(x, y + 16, w, line_height, cname,1)
  396.   end
  397.   
  398.   def draw_character(character_name, character_index, x, y,enabled,i)
  399.     return unless character_name
  400.     bitmap = Cache.character(character_name)
  401.     sign = character_name[/^[\!\$]./]
  402.     if sign && sign.include?('$')
  403.       cw = bitmap.width / 3
  404.       ch = bitmap.height / 4
  405.     else
  406.       cw = bitmap.width / 12
  407.       ch = bitmap.height / 8
  408.     end
  409.     n = character_index
  410.     step = 0
  411.     step = @walk if enabled && i == index
  412.     src_rect = Rect.new((n%4*3+1+step)*cw, (n/4*4)*ch, cw, ch)
  413.     contents.blt(x - cw / 2, y - ch, bitmap, src_rect, enabled ? 255 : 150)
  414.   end
  415.   
  416.   def refresh
  417.     make_item_list
  418.     create_contents
  419.     draw_all_items
  420.   end
  421.   
  422.   def update
  423.     super
  424.     update_walk
  425.     redraw_item(index)
  426.   end
  427.   
  428.   def update_walk
  429.     @animtime += 1
  430.     if @animtime == 10
  431.       case @walk
  432.       when 1; @walk -= 1
  433.       when -1; @walk += 1
  434.       when 0
  435.         if @step == 1
  436.           @walk = -1; @step = 0
  437.         else
  438.           @walk = 1; @step = 1
  439.         end
  440.       end
  441.       @animtime = 0
  442.     end
  443.   end
  444.   
  445.   def cursor_down(wrap = false); super; cursor_move_extras; end
  446.   def cursor_up(wrap = false); super; cursor_move_extras; end
  447.   def cursor_left(wrap = false); super; cursor_move_extras; end
  448.   def cursor_right(wrap = false); super; cursor_move_extras; end
  449.    
  450.   def cursor_move_extras
  451.     @walk = 0
  452.     @animtime = 0
  453.     redraw_item(@last_index)
  454.     @last_index = index
  455.   end
  456. end
  457. #--------------------------------------------------------------------------
  458. # ● 仓库窗口
  459. #--------------------------------------------------------------------------
  460. class Window_Party2 < Window_Selectable
  461.   def initialize(x, y, width, height)
  462.     super(x, y, width, height)
  463.     @data = []
  464.     @last_index ||= 0
  465.     @animtime = 0
  466.     @walk = 0
  467.     refresh
  468.     select_last
  469.   end
  470.   
  471.   def item_width
  472.     (width - standard_padding * 2 + spacing) / col_max - spacing
  473.   end
  474.   def item_height; item_width; end
  475.   def spacing; return 1; end
  476.   def col_max; return 3; end
  477.   def item_max; @data ? @data.size : 0; end
  478.   def select_actor; @data && index >= 0 ? @data[index] : nil; end
  479.    
  480.   def current_item_enabled?
  481.     enable?(@data[index])
  482.   end
  483.   def enable?(actor)
  484.     return false if !actor
  485.     return true
  486.   end
  487.   
  488.   def include?(actor)
  489.     return false if actor.nil?
  490.     return true
  491.   end
  492.   
  493.   def make_item_list
  494.     @data = $game_party.party2_all_members.select {|actor| include?(actor) }
  495.     @data.push(nil) if include?(nil)
  496.   end
  497.   
  498.   def select_last
  499.     select(@data.index($game_party.last_party2) || 0)
  500.   end
  501.   
  502.   def actor_rect(index)
  503.     rect = Rect.new
  504.     rect.width = item_width
  505.     rect.height = item_height
  506.     rect.x = index % col_max * (item_width + spacing)
  507.     rect.y = index / col_max * item_height
  508.     rect
  509.   end
  510.   
  511.   def offset
  512.     Graphics.height < 480 ? 0 : 10
  513.   end
  514.   
  515.   def draw_item(index)
  516.     actor = @data[index]
  517.     if actor
  518.       rect = actor_rect(index)
  519.       rect.width -= 4
  520.       draw_actor_text(actor,rect.x + 2,rect.y + 38 + offset, enable?(actor),
  521.         rect.width)
  522.       draw_character(actor.character_name, actor.character_index,
  523.         rect.x + item_width / 1.6 - 1, rect.y + 38 + offset,
  524.         enable?(actor),index)
  525.     end
  526.   end
  527.   
  528.   def draw_actor_text(actor, x, y, enabled = true, w)
  529.     return unless actor
  530.     #icon1 = get_icon(:actor,actor)
  531.     #icon2 = get_icon(:weapon,actor)
  532.     #draw_icon(icon1, x + 6, y - 20, enabled)
  533.     #draw_icon(icon2, x + 6, y - 20, enabled)
  534.     change_color(normal_color, enabled)
  535.     contents.font.size = 18
  536.     draw_text(x, y, w, line_height, actor.name,1)
  537.     contents.font.size = 16
  538.     lvl = Vocab::level_a + actor.level.to_s
  539.     cname = actor.class.name
  540.     draw_text(x + 10, y - 40, w, line_height, lvl,0)
  541.     draw_text(x, y + 16, w, line_height, cname,1)
  542.   end
  543.   
  544.   def draw_character(character_name, character_index, x, y,enabled,i)
  545.     return unless character_name
  546.     bitmap = Cache.character(character_name)
  547.     sign = character_name[/^[\!\$]./]
  548.     if sign && sign.include?('$')
  549.       cw = bitmap.width / 3
  550.       ch = bitmap.height / 4
  551.     else
  552.       cw = bitmap.width / 12
  553.       ch = bitmap.height / 8
  554.     end
  555.     n = character_index
  556.     step = 0
  557.     step = @walk if enabled && i == index
  558.     src_rect = Rect.new((n%4*3+1+step)*cw, (n/4*4)*ch, cw, ch)
  559.     contents.blt(x - cw / 2, y - ch, bitmap, src_rect, enabled ? 255 : 150)
  560.   end
  561.   
  562.   def refresh
  563.     make_item_list
  564.     create_contents
  565.     draw_all_items
  566.   end
  567.   
  568.   def update
  569.     super
  570.     update_walk
  571.     redraw_item(index)
  572.   end
  573.   
  574.   def update_walk
  575.     @animtime += 1
  576.     if @animtime == 10
  577.       case @walk
  578.       when 1; @walk -= 1
  579.       when -1; @walk += 1
  580.       when 0
  581.         if @step == 1
  582.           @walk = -1; @step = 0
  583.         else
  584.           @walk = 1; @step = 1
  585.         end
  586.       end
  587.       @animtime = 0
  588.     end
  589.   end
  590.   
  591.   def cursor_down(wrap = false); super; cursor_move_extras; end
  592.   def cursor_up(wrap = false); super; cursor_move_extras; end
  593.   def cursor_left(wrap = false); super; cursor_move_extras; end
  594.   def cursor_right(wrap = false); super; cursor_move_extras; end
  595.    
  596.   def cursor_move_extras
  597.     @walk = 0
  598.     @animtime = 0
  599.     redraw_item(@last_index)
  600.     @last_index = index
  601.   end
  602. end
  603. #--------------------------------------------------------------------------
  604. # ● 命令窗口
  605. #--------------------------------------------------------------------------
  606. class Window_Party2Command < Window_Command
  607.   def initialize(x,y)
  608.     super(x,y)
  609.     self.opacity = 255
  610.     self.back_opacity = 255
  611.   end
  612.   
  613.   def window_width; return 160; end
  614.   def visible_line_number; item_max; end
  615.   
  616.   def make_command_list
  617.     @cmd_index = []
  618.     PARTY2::CMDS.each { |cmd|
  619.       if $game_party.inparty == true
  620.         text = cmd[1][0]
  621.       else
  622.         text = cmd[1][1]
  623.       end
  624.       handle = cmd[1][2]#.delete(' ').downcase.to_sym
  625.       add_command(text,handle,check_enabled(cmd[0]))
  626.       @cmd_index << cmd[0]
  627.     }
  628.   end
  629.   
  630.   def check_enabled(cmd)
  631.     if $game_party.inparty == true
  632.       actor = $game_party.last_party1
  633.       if actor == nil
  634.         return false
  635.       else
  636.         return false if cmd == :in_out && PARTY2::NO_INPARTY2.include?(actor.id)#不能存入仓库的角色ID
  637.         return false if cmd == :dismiss && PARTY2::NO_DISMISS.include?(actor.id)#不能离队的角色
  638.       end
  639.       return false if cmd == :in_out && $game_party.members.count <= 1#队伍不能为空:最后一人不能存入仓库
  640.       return false if cmd == :dismiss && $game_party.members.count <= 1#队伍不能为空:最后一人不能放生
  641.       return false if cmd == :in_out && $game_party.party2_all_members.count >= PARTY2::PARTY2MAX#仓库已满
  642.       return false if cmd == :sw && $game_party.party2_all_members.count <= 0#仓库为空不能切换
  643.     else
  644.       actor = $game_party.last_party2
  645.       if actor == nil
  646.         return false
  647.       else
  648.         return false if cmd == :dismiss && PARTY2::NO_DISMISS.include?(actor.id)#不能离队的角色
  649.       end
  650.       return false if cmd == :in_out && $game_party.all_members.count >= PARTY2::PARTY1MAX#队伍已满
  651.     end
  652.     return true
  653.   end
  654.   
  655.   def draw_item(index)
  656.     change_color(normal_color, command_enabled?(index))
  657.     recti = item_rect_for_text(index)
  658.     recti.x += 26
  659.     draw_text(recti, command_name(index), alignment)
  660.     draw_icon(PARTY2::CMDS[@cmd_index[index]][3],0,recti.y)
  661.   end
  662. end

  663. #--------------------------------------------------------------------------
  664. # ● 脸图窗口
  665. #--------------------------------------------------------------------------
  666. class Window_Party2Face < Window_Base
  667.   def initialize(x,y,w,h)
  668.     super(x - w,y,w,h)
  669.     self.opacity = 255
  670.     self.back_opacity = 255
  671.   end

  672.   def draw_cont
  673.     fy = (contents.height - 96) / 2
  674.     fx = (contents.width - 96) / 2
  675.     if $game_party.inparty == true
  676.       draw_actor_face($game_party.last_party1, fx, fy)
  677.     else
  678.       draw_actor_face($game_party.last_party2, fx, fy)
  679.     end
  680.   end

  681.   def refresh
  682.     contents.clear
  683.     draw_cont
  684.   end
  685. end
复制代码
梦石
0
星屑
39336
在线时间
11161 小时
注册时间
2009-3-15
回帖
4768
发表于 2019-3-15 18:48:36 | 显示全部楼层
$game_party.party2_add_actor(角色ID)

点评

非常感謝  发表于 2019-3-16 09:16

评分

参与人数 1星屑 +100 收起 理由
VIPArcher + 100 塞糖

查看全部评分

回复

使用道具 举报

您需要登录后才可以回帖 登录 | 注册会员

本版积分规则

Powered by Discuz! X5.0 © 2001-2026 Discuz! Team.

在本版发帖返回顶部