设为首页收藏本站|繁體中文

Project1

 找回密码
 注册会员
搜索
查看: 2674|回复: 2
打印 上一主题 下一主题

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

[复制链接]

Lv3.寻梦者

梦石
0
星屑
3780
在线时间
204 小时
注册时间
2018-6-17
帖子
172
跳转到指定楼层
1
发表于 2019-3-15 17:17:50 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式

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

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

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

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

我所使用的角色倉庫脚本:
RUBY 代码复制
  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.  
  34. module SceneManager
  35.   def self.party2call(scene_class)
  36.     @stack.push(@scene)
  37.     [url=home.php?mod=space&uid=420706]@Scene[/url] = Kernel.const_get(scene_class).new
  38.   end
  39. end
  40.  
  41. class Game_Party < Game_Unit
  42.   attr_accessor :last_party1
  43.   attr_accessor :last_party2
  44.   attr_accessor :party2
  45.   attr_accessor :inparty
  46.  
  47.   alias tan_party2_initialize initialize
  48.   def initialize
  49.     tan_party2_initialize
  50.     #@last_party1 = nil
  51.     #@last_party2 = nil
  52.     @party2 = []
  53.     @inparty = true
  54.   end
  55.   #--------------------------------------------------------------------------
  56.   # ● 加入仓库
  57.   #--------------------------------------------------------------------------
  58.   def party2_add_actor(actor_id)
  59.     @party2.push(actor_id) unless @party2.include?(actor_id)
  60.   end
  61.   #--------------------------------------------------------------------------
  62.   # ● 从仓库取出
  63.   #--------------------------------------------------------------------------
  64.   def party2_remove_actor(actor_id,a = false)
  65.     if a#清除数据
  66.       @party2.delete(actor_id)
  67.       $data_actors[actor_id] = nil
  68.     else#普通取出
  69.       @party2.delete(actor_id)
  70.     end
  71.   end
  72.   #--------------------------------------------------------------------------
  73.   # ● 获取仓库所有成员
  74.   #--------------------------------------------------------------------------
  75.   def party2_all_members
  76.     @party2.collect {|id| $game_actors[id] }
  77.   end
  78. end
  79. class SPS_s < Scene_Status
  80.   #--------------------------------------------------------------------------
  81.   # ● Execute Setup
  82.   #--------------------------------------------------------------------------        
  83.   def execute_setup
  84.     if $game_party.inparty == true
  85.      @actor_old = @actor = $game_party.last_party1
  86.     else
  87.      @actor_old = @actor = $game_party.last_party2
  88.     end
  89.     @phase = 0
  90.     create_sprites
  91.   end
  92. end  
  93. #--------------------------------------------------------------------------
  94. # ● 总界面
  95. #--------------------------------------------------------------------------
  96. class Scene_Party2 < Scene_MenuBase
  97.   #--------------------------------------------------------------------------
  98.   # ● 创建窗口
  99.   #--------------------------------------------------------------------------
  100.   def start
  101.     super
  102.     create_party1_window
  103.     create_party2_window
  104.     create_command_window
  105.     create_face_window
  106.   end
  107.   #--------------------------------------------------------------------------
  108.   # ● 队伍窗口设定
  109.   #--------------------------------------------------------------------------
  110.   def create_party1_window
  111.     ww = Graphics.width / 5 * 2
  112.     wh = Graphics.height
  113.     @party1_window = Window_Party1.new(0,0,ww,wh)
  114.     @party1_window.viewport = @viewport
  115.     @party1_window.activate if $game_party.inparty == true
  116.     @party1_window.set_handler(:ok, method(:on_party1_ok))
  117.     @party1_window.set_handler(:cancel, method(:return_scene1))
  118.   end
  119.   #--------------------------------------------------------------------------
  120.   # ● 仓库窗口设定
  121.   #--------------------------------------------------------------------------
  122.   def create_party2_window
  123.     wx = Graphics.width / 5 * 2
  124.     ww = Graphics.width / 5 * 3
  125.     wh = Graphics.height
  126.     @party2_window = Window_Party2.new(wx,0,ww,wh)
  127.     @party2_window.viewport = @viewport
  128.     @party2_window.activate if $game_party.inparty == false
  129.     @party2_window.set_handler(:ok, method(:on_party2_ok))
  130.     @party2_window.set_handler(:cancel, method(:return_scene2))
  131.   end
  132.   #--------------------------------------------------------------------------
  133.   # ● 命令窗口设定
  134.   #--------------------------------------------------------------------------
  135.   def create_command_window
  136.     wx = Graphics.width / 2
  137.     wy = Graphics.height / 2
  138.     @command_window = Window_Party2Command.new(wx + 10,wy)
  139.     @command_window.viewport = @viewport
  140.     PARTY2::CMDS.each { |cmd|
  141.       handle = cmd[1][2]#.delete(' ').downcase.to_sym
  142.       @command_window.set_handler(handle, method(:cmd))
  143.     }
  144.     @command_window.set_handler(:cancel, method(:back_to_myscene))
  145.     @command_window.y -= @command_window.height
  146.     @command_window.hide.deactivate
  147.   end
  148.   #--------------------------------------------------------------------------
  149.   # ● 脸图窗口设定
  150.   #--------------------------------------------------------------------------
  151.   def create_face_window
  152.     ww = @command_window.width
  153.     wh = @command_window.height
  154.     wx = @command_window.x
  155.     wy = @command_window.y
  156.     @face_window = Window_Party2Face.new(wx,wy,ww,wh)
  157.     @face_window.viewport = @viewport
  158.     @face_window.hide
  159.   end
  160.   #--------------------------------------------------------------------------
  161.   # ● 命令窗口命令初始化
  162.   #--------------------------------------------------------------------------
  163.   def cmd
  164.     list = PARTY2::CMDS.to_a
  165.     cmd = @command_window.index
  166.     symbol = list[cmd][1][2]
  167.     if custom_action(symbol)
  168.       custom_on_command_ok(symbol)
  169.     else
  170.       SceneManager.party2call(list[cmd][1][2])
  171.     end
  172.   end
  173.  
  174.   def custom_action(symbol)
  175.     case symbol
  176.     when :dismiss,:sw,:in_out
  177.       return true
  178.     else
  179.       return false
  180.     end
  181.   end
  182.  
  183.   def custom_on_command_ok(symbol)
  184.     case symbol
  185.     when :dismiss
  186.       do_dismiss
  187.     when :sw
  188.       do_sw
  189.     when :in_out
  190.       do_in_out
  191.     end
  192.   end
  193.  
  194.   def terminate
  195.     super
  196.   end
  197.  
  198.   def update
  199.     super
  200.   end
  201.  
  202.   #--------------------------------------------------------------------------
  203.   # ● 队伍窗口:确定
  204.   #--------------------------------------------------------------------------
  205.   def on_party1_ok
  206.     $game_party.last_party1 = @party1_window.select_actor
  207.     @command_window.refresh
  208.     @face_window.refresh
  209.     @command_window.show.activate
  210.     @face_window.show.activate
  211.   end
  212.   #--------------------------------------------------------------------------
  213.   # ● 队伍窗口:取消
  214.   #--------------------------------------------------------------------------
  215.   def return_scene1
  216.     $game_party.last_party1 = nil
  217.     $game_party.last_party2 = nil
  218.     $game_party.inparty = true
  219.     SceneManager.return
  220.   end
  221.   #--------------------------------------------------------------------------
  222.   # ● 仓库窗口:确定
  223.   #--------------------------------------------------------------------------
  224.   def on_party2_ok
  225.     $game_party.last_party2 = @party2_window.select_actor
  226.     @command_window.refresh
  227.     @face_window.refresh
  228.     @command_window.show.activate
  229.     @face_window.show.activate
  230.   end
  231.   #--------------------------------------------------------------------------
  232.   # ● 仓库窗口:取消
  233.   #--------------------------------------------------------------------------
  234.   def return_scene2
  235.     do_sw
  236.   end
  237.   #--------------------------------------------------------------------------
  238.   # ● 命令窗口:取消
  239.   #--------------------------------------------------------------------------
  240.   def back_to_myscene
  241.     @command_window.hide.deactivate
  242.     @face_window.hide
  243.     if $game_party.inparty == true
  244.       @party1_window.activate
  245.     else
  246.       @party2_window.activate
  247.     end
  248.   end
  249.   #--------------------------------------------------------------------------
  250.   # ● 命令窗口:切换
  251.   #--------------------------------------------------------------------------
  252.   def do_sw
  253.     if $game_party.inparty == true
  254.       $game_party.inparty = false
  255.       @command_window.hide.deactivate
  256.       @face_window.hide
  257.       @party2_window.activate
  258.     else
  259.       $game_party.inparty = true
  260.       @command_window.hide.deactivate
  261.       @face_window.hide
  262.       @party1_window.activate
  263.     end
  264.   end
  265.   #--------------------------------------------------------------------------
  266.   # ● 命令窗口:存入、取出
  267.   #--------------------------------------------------------------------------
  268.   def do_in_out
  269.     if $game_party.inparty == true
  270.       #存入仓库
  271.       $game_party.party2_add_actor(@party1_window.select_actor.id)
  272.       $game_party.remove_actor(@party1_window.select_actor.id)
  273.       @command_window.hide.deactivate
  274.       @face_window.hide
  275.       @party1_window.refresh
  276.       @party2_window.refresh
  277.       @party1_window.activate
  278.     else
  279.       #取出
  280.       $game_party.add_actor(@party2_window.select_actor.id)
  281.       $game_party.party2_remove_actor(@party2_window.select_actor.id)
  282.       if $game_party.party2_all_members.count <= 0
  283.         @party1_window.refresh
  284.         @party2_window.refresh
  285.         do_sw
  286.       else
  287.         @command_window.hide.deactivate
  288.         @face_window.hide
  289.         @party1_window.refresh
  290.         @party2_window.refresh
  291.         @party2_window.activate
  292.       end
  293.     end
  294.   end
  295.   #--------------------------------------------------------------------------
  296.   # ● 命令窗口:放生
  297.   #--------------------------------------------------------------------------
  298.   def do_dismiss
  299.     if $game_party.inparty == true
  300.       $game_party.tan_remove_actor(@party1_window.select_actor.id,true)
  301.       @command_window.hide.deactivate
  302.       @face_window.hide
  303.       @party1_window.refresh
  304.       @party1_window.activate
  305.     else
  306.       $game_party.party2_remove_actor(@party2_window.select_actor.id,true)
  307.       @command_window.hide.deactivate
  308.       @face_window.hide
  309.       @party2_window.refresh
  310.       @party2_window.activate
  311.     end
  312.   end
  313. end
  314. #--------------------------------------------------------------------------
  315. # ● 队伍窗口
  316. #--------------------------------------------------------------------------
  317. class Window_Party1 < Window_Selectable
  318.   def initialize(x, y, width, height)
  319.     super(x, y, width, height)
  320.     @data = []
  321.     @last_index ||= 0
  322.     @animtime = 0
  323.     @walk = 0
  324.     refresh
  325.     select_last
  326.   end
  327.  
  328.   def item_width
  329.     (width - standard_padding * 2 + spacing) / col_max - spacing
  330.   end
  331.   def item_height; item_width; end
  332.   def spacing; return 1; end
  333.   def col_max; return 2; end
  334.   def item_max; @data ? @data.size : 1; end
  335.   def select_actor; @data && index >= 0 ? @data[index] : nil; end
  336.  
  337.   def current_item_enabled?
  338.     enable?(@data[index])
  339.   end
  340.   def enable?(actor)
  341.     return false if !actor
  342.     return true
  343.   end
  344.  
  345.   def include?(actor)
  346.     return false if actor.nil?
  347.     return true
  348.   end
  349.  
  350.   def make_item_list
  351.     @data = $game_party.members.select {|actor| include?(actor) }
  352.     @data.push(nil) if include?(nil)
  353.   end
  354.  
  355.   def select_last
  356.     select(@data.index($game_party.last_party1) || 0)
  357.   end
  358.  
  359.   def actor_rect(index)
  360.     rect = Rect.new
  361.     rect.width = item_width
  362.     rect.height = item_height
  363.     rect.x = index % col_max * (item_width + spacing)
  364.     rect.y = index / col_max * item_height
  365.     rect
  366.   end
  367.  
  368.   def offset
  369.     Graphics.height < 480 ? 0 : 10
  370.   end
  371.  
  372.   def draw_item(index)
  373.     actor = @data[index]
  374.     if actor
  375.       rect = actor_rect(index)
  376.       rect.width -= 4
  377.       draw_actor_text(actor,rect.x + 2,rect.y + 38 + offset, enable?(actor),
  378.         rect.width)
  379.       draw_character(actor.character_name, actor.character_index,
  380.         rect.x + item_width / 1.6 - 1, rect.y + 38 + offset,
  381.         enable?(actor),index)
  382.     end
  383.   end
  384.  
  385.   def draw_actor_text(actor, x, y, enabled = true, w)
  386.     return unless actor
  387.     #icon1 = get_icon(:actor,actor)
  388.     #icon2 = get_icon(:weapon,actor)
  389.     #draw_icon(icon1, x + 6, y - 20, enabled)
  390.     #draw_icon(icon2, x + 6, y - 20, enabled)
  391.     change_color(normal_color, enabled)
  392.     contents.font.size = 18
  393.     draw_text(x, y, w, line_height, actor.name,1)
  394.     contents.font.size = 16
  395.     lvl = Vocab::level_a + actor.level.to_s
  396.     cname = actor.class.name
  397.     draw_text(x + 10, y - 40, w, line_height, lvl,0)
  398.     draw_text(x, y + 16, w, line_height, cname,1)
  399.   end
  400.  
  401.   def draw_character(character_name, character_index, x, y,enabled,i)
  402.     return unless character_name
  403.     bitmap = Cache.character(character_name)
  404.     sign = character_name[/^[\!\$]./]
  405.     if sign && sign.include?('$')
  406.       cw = bitmap.width / 3
  407.       ch = bitmap.height / 4
  408.     else
  409.       cw = bitmap.width / 12
  410.       ch = bitmap.height / 8
  411.     end
  412.     n = character_index
  413.     step = 0
  414.     step = @walk if enabled && i == index
  415.     src_rect = Rect.new((n%4*3+1+step)*cw, (n/4*4)*ch, cw, ch)
  416.     contents.blt(x - cw / 2, y - ch, bitmap, src_rect, enabled ? 255 : 150)
  417.   end
  418.  
  419.   def refresh
  420.     make_item_list
  421.     create_contents
  422.     draw_all_items
  423.   end
  424.  
  425.   def update
  426.     super
  427.     update_walk
  428.     redraw_item(index)
  429.   end
  430.  
  431.   def update_walk
  432.     @animtime += 1
  433.     if @animtime == 10
  434.       case @walk
  435.       when 1; @walk -= 1
  436.       when -1; @walk += 1
  437.       when 0
  438.         if @step == 1
  439.           @walk = -1; @step = 0
  440.         else
  441.           @walk = 1; @step = 1
  442.         end
  443.       end
  444.       @animtime = 0
  445.     end
  446.   end
  447.  
  448.   def cursor_down(wrap = false); super; cursor_move_extras; end
  449.   def cursor_up(wrap = false); super; cursor_move_extras; end
  450.   def cursor_left(wrap = false); super; cursor_move_extras; end
  451.   def cursor_right(wrap = false); super; cursor_move_extras; end
  452.  
  453.   def cursor_move_extras
  454.     @walk = 0
  455.     @animtime = 0
  456.     redraw_item(@last_index)
  457.     @last_index = index
  458.   end
  459. end
  460. #--------------------------------------------------------------------------
  461. # ● 仓库窗口
  462. #--------------------------------------------------------------------------
  463. class Window_Party2 < Window_Selectable
  464.   def initialize(x, y, width, height)
  465.     super(x, y, width, height)
  466.     @data = []
  467.     @last_index ||= 0
  468.     @animtime = 0
  469.     @walk = 0
  470.     refresh
  471.     select_last
  472.   end
  473.  
  474.   def item_width
  475.     (width - standard_padding * 2 + spacing) / col_max - spacing
  476.   end
  477.   def item_height; item_width; end
  478.   def spacing; return 1; end
  479.   def col_max; return 3; end
  480.   def item_max; @data ? @data.size : 0; end
  481.   def select_actor; @data && index >= 0 ? @data[index] : nil; end
  482.  
  483.   def current_item_enabled?
  484.     enable?(@data[index])
  485.   end
  486.   def enable?(actor)
  487.     return false if !actor
  488.     return true
  489.   end
  490.  
  491.   def include?(actor)
  492.     return false if actor.nil?
  493.     return true
  494.   end
  495.  
  496.   def make_item_list
  497.     @data = $game_party.party2_all_members.select {|actor| include?(actor) }
  498.     @data.push(nil) if include?(nil)
  499.   end
  500.  
  501.   def select_last
  502.     select(@data.index($game_party.last_party2) || 0)
  503.   end
  504.  
  505.   def actor_rect(index)
  506.     rect = Rect.new
  507.     rect.width = item_width
  508.     rect.height = item_height
  509.     rect.x = index % col_max * (item_width + spacing)
  510.     rect.y = index / col_max * item_height
  511.     rect
  512.   end
  513.  
  514.   def offset
  515.     Graphics.height < 480 ? 0 : 10
  516.   end
  517.  
  518.   def draw_item(index)
  519.     actor = @data[index]
  520.     if actor
  521.       rect = actor_rect(index)
  522.       rect.width -= 4
  523.       draw_actor_text(actor,rect.x + 2,rect.y + 38 + offset, enable?(actor),
  524.         rect.width)
  525.       draw_character(actor.character_name, actor.character_index,
  526.         rect.x + item_width / 1.6 - 1, rect.y + 38 + offset,
  527.         enable?(actor),index)
  528.     end
  529.   end
  530.  
  531.   def draw_actor_text(actor, x, y, enabled = true, w)
  532.     return unless actor
  533.     #icon1 = get_icon(:actor,actor)
  534.     #icon2 = get_icon(:weapon,actor)
  535.     #draw_icon(icon1, x + 6, y - 20, enabled)
  536.     #draw_icon(icon2, x + 6, y - 20, enabled)
  537.     change_color(normal_color, enabled)
  538.     contents.font.size = 18
  539.     draw_text(x, y, w, line_height, actor.name,1)
  540.     contents.font.size = 16
  541.     lvl = Vocab::level_a + actor.level.to_s
  542.     cname = actor.class.name
  543.     draw_text(x + 10, y - 40, w, line_height, lvl,0)
  544.     draw_text(x, y + 16, w, line_height, cname,1)
  545.   end
  546.  
  547.   def draw_character(character_name, character_index, x, y,enabled,i)
  548.     return unless character_name
  549.     bitmap = Cache.character(character_name)
  550.     sign = character_name[/^[\!\$]./]
  551.     if sign && sign.include?('$')
  552.       cw = bitmap.width / 3
  553.       ch = bitmap.height / 4
  554.     else
  555.       cw = bitmap.width / 12
  556.       ch = bitmap.height / 8
  557.     end
  558.     n = character_index
  559.     step = 0
  560.     step = @walk if enabled && i == index
  561.     src_rect = Rect.new((n%4*3+1+step)*cw, (n/4*4)*ch, cw, ch)
  562.     contents.blt(x - cw / 2, y - ch, bitmap, src_rect, enabled ? 255 : 150)
  563.   end
  564.  
  565.   def refresh
  566.     make_item_list
  567.     create_contents
  568.     draw_all_items
  569.   end
  570.  
  571.   def update
  572.     super
  573.     update_walk
  574.     redraw_item(index)
  575.   end
  576.  
  577.   def update_walk
  578.     @animtime += 1
  579.     if @animtime == 10
  580.       case @walk
  581.       when 1; @walk -= 1
  582.       when -1; @walk += 1
  583.       when 0
  584.         if @step == 1
  585.           @walk = -1; @step = 0
  586.         else
  587.           @walk = 1; @step = 1
  588.         end
  589.       end
  590.       @animtime = 0
  591.     end
  592.   end
  593.  
  594.   def cursor_down(wrap = false); super; cursor_move_extras; end
  595.   def cursor_up(wrap = false); super; cursor_move_extras; end
  596.   def cursor_left(wrap = false); super; cursor_move_extras; end
  597.   def cursor_right(wrap = false); super; cursor_move_extras; end
  598.  
  599.   def cursor_move_extras
  600.     @walk = 0
  601.     @animtime = 0
  602.     redraw_item(@last_index)
  603.     @last_index = index
  604.   end
  605. end
  606. #--------------------------------------------------------------------------
  607. # ● 命令窗口
  608. #--------------------------------------------------------------------------
  609. class Window_Party2Command < Window_Command
  610.   def initialize(x,y)
  611.     super(x,y)
  612.     self.opacity = 255
  613.     self.back_opacity = 255
  614.   end
  615.  
  616.   def window_width; return 160; end
  617.   def visible_line_number; item_max; end
  618.  
  619.   def make_command_list
  620.     @cmd_index = []
  621.     PARTY2::CMDS.each { |cmd|
  622.       if $game_party.inparty == true
  623.         text = cmd[1][0]
  624.       else
  625.         text = cmd[1][1]
  626.       end
  627.       handle = cmd[1][2]#.delete(' ').downcase.to_sym
  628.       add_command(text,handle,check_enabled(cmd[0]))
  629.       @cmd_index << cmd[0]
  630.     }
  631.   end
  632.  
  633.   def check_enabled(cmd)
  634.     if $game_party.inparty == true
  635.       actor = $game_party.last_party1
  636.       if actor == nil
  637.         return false
  638.       else
  639.         return false if cmd == :in_out && PARTY2::NO_INPARTY2.include?(actor.id)#不能存入仓库的角色ID
  640.         return false if cmd == :dismiss && PARTY2::NO_DISMISS.include?(actor.id)#不能离队的角色
  641.       end
  642.       return false if cmd == :in_out && $game_party.members.count <= 1#队伍不能为空:最后一人不能存入仓库
  643.       return false if cmd == :dismiss && $game_party.members.count <= 1#队伍不能为空:最后一人不能放生
  644.       return false if cmd == :in_out && $game_party.party2_all_members.count >= PARTY2::PARTY2MAX#仓库已满
  645.       return false if cmd == :sw && $game_party.party2_all_members.count <= 0#仓库为空不能切换
  646.     else
  647.       actor = $game_party.last_party2
  648.       if actor == nil
  649.         return false
  650.       else
  651.         return false if cmd == :dismiss && PARTY2::NO_DISMISS.include?(actor.id)#不能离队的角色
  652.       end
  653.       return false if cmd == :in_out && $game_party.all_members.count >= PARTY2::PARTY1MAX#队伍已满
  654.     end
  655.     return true
  656.   end
  657.  
  658.   def draw_item(index)
  659.     change_color(normal_color, command_enabled?(index))
  660.     recti = item_rect_for_text(index)
  661.     recti.x += 26
  662.     draw_text(recti, command_name(index), alignment)
  663.     draw_icon(PARTY2::CMDS[@cmd_index[index]][3],0,recti.y)
  664.   end
  665. end
  666.  
  667. #--------------------------------------------------------------------------
  668. # ● 脸图窗口
  669. #--------------------------------------------------------------------------
  670. class Window_Party2Face < Window_Base
  671.   def initialize(x,y,w,h)
  672.     super(x - w,y,w,h)
  673.     self.opacity = 255
  674.     self.back_opacity = 255
  675.   end
  676.  
  677.   def draw_cont
  678.     fy = (contents.height - 96) / 2
  679.     fx = (contents.width - 96) / 2
  680.     if $game_party.inparty == true
  681.       draw_actor_face($game_party.last_party1, fx, fy)
  682.     else
  683.       draw_actor_face($game_party.last_party2, fx, fy)
  684.     end
  685.   end
  686.  
  687.   def refresh
  688.     contents.clear
  689.     draw_cont
  690.   end
  691. end

Lv5.捕梦者

梦石
0
星屑
36397
在线时间
10791 小时
注册时间
2009-3-15
帖子
4813
2
发表于 2019-3-15 18:48:36 | 只看该作者
$game_party.party2_add_actor(角色ID)

点评

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

评分

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

查看全部评分

回复 支持 反对

使用道具 举报

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

本版积分规则

拿上你的纸笔,建造一个属于你的梦想世界,加入吧。
 注册会员
找回密码

站长信箱:[email protected]|手机版|小黑屋|无图版|Project1游戏制作

GMT+8, 2024-11-16 23:44

Powered by Discuz! X3.1

© 2001-2013 Comsenz Inc.

快速回复 返回顶部 返回列表