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

Project1

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

[已经解决] 关于人物扩张脚本的延伸问题

[复制链接]

Lv2.观梦者

梦石
0
星屑
531
在线时间
310 小时
注册时间
2016-4-13
帖子
227

开拓者

跳转到指定楼层
1
发表于 2016-10-1 09:12:14 | 只看该作者 |只看大图 回帖奖励 |倒序浏览 |阅读模式

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

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

x
利用下面脚本可以让游戏显示在地图的角色发生改变,那么如何判断显示在地图的是哪位角色?是需要对脚本进行什么修改,还是可以直接利用什么进行判断?望大神解惑,感谢不尽。
RUBY 代码复制
  1. #============================================================================================
  2. # 本脚本来自[url]www.66RPG.com[/url],转载和使用请保留此信息
  3. #============================================================================================
  4. # ▼▲▼ XRXS26. 人物扩张系统 ver..05 ▼▲▼
  5. # by 桜雅 在土
  6.  
  7. #==============================================================================
  8. # □ 初始化定义
  9. #==============================================================================
  10. module XRXS26
  11.   FRONT_MEMBER_LIMIT    = 4       # 战斗参战人数最大值
  12.   BACKWARD_MEMBER_LIMIT = 10        # 待机人数最大值
  13.   BACKWARD_EXP_GAINABLE = true     # 待机人物是否获得经验
  14.   MENU_STATUS_STRETCH   = true    # 3人以下的时候,菜单是否拉伸大小
  15. end
  16. #------------------------------------------------------------------------------
  17. # 菜单页面状态
  18. #------------------------------------------------------------------------------
  19. class Window_MenuStatus < Window_Selectable
  20.   # 列数
  21.   COLUMN_MAX = 1
  22.   # 光标高度
  23.   CURSOR_HEIGHT = 96
  24.   # 一行的高度
  25.   LINE_HEIGHT = 116
  26. end
  27. #------------------------------------------------------------------------------
  28. # 菜单场景
  29. #------------------------------------------------------------------------------
  30. class Scene_Menu
  31.   MENU_MEMBER_CHANGE_KEY_GO    = Input::RIGHT # 进入键
  32.   MENU_MEMBER_CHANGE_KEY_END   = Input::LEFT  # 离开键
  33.   MENU_MEMBER_CHANGE_INDEX_MIN = 0            # 可更换角色最小编号
  34.   FORCETOBATTLE_ACTORS         = []           # 不能待机的角色编号
  35.   UMBATTLABLE_ACTORS           = []           # 不能加入战斗的角色编号
  36.   UNMOVABLE_ACTORS             = []           # 不能移动的角色编号
  37. end
  38. #------------------------------------------------------------------------------
  39. #
  40. # 解説
  41. #    Game_Partyの @actors のうち先頭から↑FRONT_MEMBER_LIMIT番目までのアクターを
  42. #   戦闘メンバーとして、それ以上を待機メンバーとして扱います。
  43. #
  44. #==============================================================================
  45. # ■ Game_Party
  46. #==============================================================================
  47. class Game_Party
  48.   #--------------------------------------------------------------------------
  49.   # ○ インクルード
  50.   #--------------------------------------------------------------------------
  51.   include XRXS26
  52.   #--------------------------------------------------------------------------
  53.   # ○ 公開インスタンス変数
  54.   #--------------------------------------------------------------------------
  55.   attr_reader   :backword_actors          # 待機アクター
  56.   #--------------------------------------------------------------------------
  57.   # ● オブジェクト初期化
  58.   #--------------------------------------------------------------------------
  59.   alias xrxs26_initialize initialize
  60.   def initialize
  61.     xrxs26_initialize
  62.     # 待機メンバー配列を初期化
  63.     @backword_actors = []
  64.   end
  65.   #--------------------------------------------------------------------------
  66.   # ● アクターを加える
  67.   #--------------------------------------------------------------------------
  68.   def add_actor(actor_id)
  69.     # アクターを取得
  70.     actor = $game_actors[actor_id]
  71.     # このアクターがパーティにいない場合
  72.     if not @actors.include?(actor)
  73.       # 満員でないならメンバーに追加
  74.       if @actors.size < (FRONT_MEMBER_LIMIT + BACKWARD_MEMBER_LIMIT)
  75.         # アクターを追加
  76.         @actors.push(actor)
  77.         # プレイヤーをリフレッシュ
  78.         $game_player.refresh
  79.       end
  80.     end
  81.   end
  82. end
  83. #==============================================================================
  84. # ■ Spriteset_Battle
  85. #==============================================================================
  86. class Spriteset_Battle
  87.   #--------------------------------------------------------------------------
  88.   # ● インクルード
  89.   #--------------------------------------------------------------------------
  90.   include XRXS26
  91.   #--------------------------------------------------------------------------
  92.   # ● フレーム更新
  93.   #--------------------------------------------------------------------------
  94.   alias xrxs26_initialize initialize
  95.   def initialize
  96.     xrxs26_initialize
  97.     #
  98.     # 以下、五人目以降のアクタースプライトの追加処理---
  99.     #
  100.     # アクターが表示されるビューポートを、とりあえず先頭の人から取得しとく(素
  101.     actor_viewport = @actor_sprites[0].viewport
  102.     # 戦闘参加メンバーが5人以上の場合
  103.     if FRONT_MEMBER_LIMIT > 4
  104.       for i in 5..FRONT_MEMBER_LIMIT
  105.         # アクタースプライトを追加
  106.         @actor_sprites.push(Sprite_Battler.new(actor_viewport))
  107.         @actor_sprites[i-1].battler = $game_party.actors[i-1]
  108.       end
  109.     end
  110.     # ビューポートを更新
  111.     actor_viewport.update
  112.   end
  113. end
  114. #==============================================================================
  115. # ■ Scene_Battle
  116. #==============================================================================
  117. class Scene_Battle
  118.   #--------------------------------------------------------------------------
  119.   # ● インクルード
  120.   #--------------------------------------------------------------------------
  121.   include XRXS26
  122.   #--------------------------------------------------------------------------
  123.   # ● メイン処理 をパーティメンバー処理ではさむ
  124.   #--------------------------------------------------------------------------
  125.   alias xrxs26_main main
  126.   def main
  127.     # 待機メンバーへ退避----------
  128.     $game_party.backword_actors[0,0] = $game_party.actors[FRONT_MEMBER_LIMIT, BACKWARD_MEMBER_LIMIT]
  129.     $game_party.actors[FRONT_MEMBER_LIMIT, BACKWARD_MEMBER_LIMIT] = nil
  130.     $game_party.actors.compact!
  131.     # メイン処理
  132.     xrxs26_main
  133.     # 待機メンバーから復帰
  134.     $game_party.actors[$game_party.actors.size,0] = $game_party.backword_actors
  135.     $game_party.backword_actors.clear
  136.   end
  137.   #--------------------------------------------------------------------------
  138.   # ● アフターバトルフェーズ開始
  139.   #--------------------------------------------------------------------------
  140.   alias xrxs26_start_phase5 start_phase5
  141.   def start_phase5
  142.     # 「待機メンバー経験値獲得」が有効 and 待機アクターが一人以上いる
  143.     if BACKWARD_EXP_GAINABLE and $game_party.backword_actors.size >= 1
  144.       # 待機メンバーから復帰
  145.       $game_party.actors[$game_party.actors.size,0] = $game_party.backword_actors
  146.       $game_party.backword_actors.clear
  147.       # 呼び戻す
  148.       xrxs26_start_phase5
  149.       # 待機メンバーへ退避----------
  150.       $game_party.backword_actors[0,0] = $game_party.actors[FRONT_MEMBER_LIMIT, BACKWARD_MEMBER_LIMIT]
  151.       $game_party.actors[FRONT_MEMBER_LIMIT, BACKWARD_MEMBER_LIMIT] = nil
  152.       $game_party.actors.compact!
  153.     else
  154.       # 呼び戻す
  155.       xrxs26_start_phase5
  156.     end
  157.   end
  158. end
  159. # ▽△▽ XRXL 4. 第二カーソル 機構 ▽△▽
  160. # by 桜雅 在土
  161.  
  162. #==============================================================================
  163. # --- XRXS. 第二カーソル 機構 ---
  164. #------------------------------------------------------------------------------
  165. #     ウィンドウに .index2 プロパティを追加します。
  166. #==============================================================================
  167. module XRXS_Cursor2
  168.   #--------------------------------------------------------------------------
  169.   # ● オブジェクト初期化
  170.   #--------------------------------------------------------------------------
  171.   def initialize(x, y, w, h)
  172.     super(x, y, h, w)
  173.     # 補助ウィンドウ(透明)を作成:カーソル専用
  174.     @xrxsc2_window = Window_Selectable.new(self.x, self.y, self.width, self.height)
  175.     @xrxsc2_window.opacity = 0
  176.     @xrxsc2_window.back_opacity = 160
  177.     @xrxsc2_window.active = false
  178.     @xrxsc2_window.index = -1
  179.   end
  180.   #--------------------------------------------------------------------------
  181.   # ○ 第二カーソルの設置
  182.   #--------------------------------------------------------------------------
  183.   def index2
  184.     return @xrxsc2_window.index
  185.   end
  186.   def index2=(index)
  187.     @xrxsc2_window.index = index
  188.     if index == -1
  189.       @xrxsc2_window.cursor_rect.empty
  190.     else
  191.       @xrxsc2_window.x = self.x
  192.       @xrxsc2_window.y = self.y
  193.       @xrxsc2_window.cursor_rect = self.cursor_rect
  194.     end
  195.   end
  196.   #--------------------------------------------------------------------------
  197.   # ○ 先頭の行の設定
  198.   #--------------------------------------------------------------------------
  199.   def top_row=(row)
  200.     super
  201.     # 補助ウィンドウの oy を更新
  202.     pre_oy = @xrxsc2_window.oy
  203.     @xrxsc2_window.oy = self.oy
  204.     @xrxsc2_window.cursor_rect.y -= self.oy - pre_oy
  205.   end
  206.   #--------------------------------------------------------------------------
  207.   # ○ 解放
  208.   #--------------------------------------------------------------------------
  209.   def dispose
  210.     @xrxsc2_window.dispose
  211.     super
  212.   end
  213.   #--------------------------------------------------------------------------
  214.   # ○ X, Y 座標
  215.   #--------------------------------------------------------------------------
  216.   def x=(n)
  217.     super
  218.     @xrxsc2_window.x = self.x unless @xrxsc2_window.nil?
  219.   end
  220.   def y=(n)
  221.     super
  222.     @xrxsc2_window.y = self.y unless @xrxsc2_window.nil?
  223.   end
  224. end
  225. # ▼▲▼ XRXS26AX. +入れ替えメニュー ver.2 ▼▲▼ built 081113
  226. # by 桜雅 在土
  227.  
  228. #==============================================================================
  229. # ■ Window_MenuStatus
  230. #==============================================================================
  231. class Window_MenuStatus < Window_Selectable
  232.   #--------------------------------------------------------------------------
  233.   # ○ インクルード
  234.   #--------------------------------------------------------------------------
  235.   include XRXS26
  236.   include XRXS_Cursor2
  237.   #--------------------------------------------------------------------------
  238.   # ● 公開インスタンス変数
  239.   #--------------------------------------------------------------------------
  240.   attr_reader   :column_max             # 列数
  241.   #--------------------------------------------------------------------------
  242.   # ● オブジェクト初期化
  243.   #--------------------------------------------------------------------------
  244.   def initialize
  245.     h = 480
  246.     if MENU_STATUS_STRETCH
  247.       h = FRONT_MEMBER_LIMIT * 116 + 16
  248.     end
  249.     super(0, 0, 480, h)
  250.     h = ($game_party.actors.size - 1) * LINE_HEIGHT + CURSOR_HEIGHT
  251.     self.contents = Bitmap.new(width - 32, h)
  252.     refresh
  253.     self.active = false
  254.     self.index = -1
  255.   end
  256.   #--------------------------------------------------------------------------
  257.   # ○ 1 ページに表示できる行数の取得
  258.   #--------------------------------------------------------------------------
  259.   def page_row_max
  260.     if MENU_STATUS_STRETCH
  261.       return FRONT_MEMBER_LIMIT          # 戦闘パーティ最大数
  262.     else
  263.       return [FRONT_MEMBER_LIMIT, 4].max # 戦闘パーティ最大数(最低4)
  264.     end
  265.   end
  266.   #--------------------------------------------------------------------------
  267.   # ○ 先頭の行の取得
  268.   #--------------------------------------------------------------------------
  269.   def top_row
  270.     # ウィンドウ内容の転送元 Y 座標を、1 行の高さ LINE_HEIGHT で割る
  271.     return self.oy / LINE_HEIGHT
  272.   end
  273.   #--------------------------------------------------------------------------
  274.   # ○ 先頭の行の設定
  275.   #--------------------------------------------------------------------------
  276.   def top_row=(row)
  277.     super
  278.     self.oy = self.oy/32 * LINE_HEIGHT
  279.   end
  280.   #--------------------------------------------------------------------------
  281.   # ● カーソルの矩形更新
  282.   #--------------------------------------------------------------------------
  283.   def update_cursor_rect
  284.     super
  285.     unless @index < 0
  286.       y = (self.cursor_rect.y + self.oy) * LINE_HEIGHT/32 - self.oy
  287.       self.cursor_rect.set(0, y, self.cursor_rect.width, CURSOR_HEIGHT)
  288.     end
  289.   end
  290. end
  291. #==============================================================================
  292. # ■ Scene_Menu
  293. #==============================================================================
  294. class Scene_Menu
  295.   #--------------------------------------------------------------------------
  296.   # ○ インクルード
  297.   #--------------------------------------------------------------------------
  298.   include XRXS26
  299.   #--------------------------------------------------------------------------
  300.   # ● フレーム更新
  301.   #--------------------------------------------------------------------------
  302.   alias xrxs26ax_update update
  303.   def update
  304.     # インデックスを保存
  305.     @status_index = @status_window.index
  306.     # 呼び戻す
  307.     xrxs26ax_update
  308.   end
  309.   #--------------------------------------------------------------------------
  310.   # ● フレーム更新 (コマンドウィンドウがアクティブの場合)
  311.   #--------------------------------------------------------------------------
  312.   alias xrxs26ax_update_command update_command
  313.   def update_command
  314.     # 呼び戻す
  315.     xrxs26ax_update_command
  316.     # 入れ替え移行キーが押されたとき、@command_window.indexが設定値以上
  317.     if Input.trigger?(MENU_MEMBER_CHANGE_KEY_GO) and
  318.        @command_window.index >= MENU_MEMBER_CHANGE_INDEX_MIN
  319.       # 決定 SE を演奏
  320.       $game_system.se_play($data_system.decision_se)
  321.       # カーソル位置を記憶
  322.       @command_index_before_menu_member_change = @command_window.index
  323.       # 入れ替えウィンドウへ移行
  324.       @command_window.active = false
  325.       @command_window.index = -1
  326.       @status_window.active = true
  327.       @status_window.index = 0
  328.     end
  329.   end
  330.   #--------------------------------------------------------------------------
  331.   # ● フレーム更新 (ステータスウィンドウがアクティブの場合)
  332.   #--------------------------------------------------------------------------
  333.   alias xrxs26ax_update_status update_status
  334.   def update_status
  335.     # 呼び戻す
  336.     if @command_window.index != -1
  337.       xrxs26ax_update_status
  338.       return
  339.     end
  340.     # B ボタンか入れ替え終了キーが押されたとき
  341.     if ((Input.trigger?(Input::B) or Input.trigger?(MENU_MEMBER_CHANGE_KEY_END)) and
  342.         @status_window.index2 == -1 and
  343.         @status_index%@status_window.column_max == 0)
  344.       # キャンセル SE を演奏
  345.       $game_system.se_play($data_system.cancel_se)
  346.       # コマンドウィンドウをアクティブにする
  347.       @command_window.active = true
  348.       @command_window.index = 0
  349.       @status_window.active = false
  350.       @status_window.index = -1
  351.       return
  352.     end
  353.     # B ボタンが押されたとき
  354.     if Input.trigger?(Input::B) and @status_window.index2 >= 0
  355.       @status_window.index = @status_window.index2
  356.       @status_window.index2 = -1
  357.       return
  358.     end
  359.     # 決定キーが押されたとき
  360.     if Input.trigger?(Input::C)
  361.       if @status_window.index2 == -1
  362.         if UNMOVABLE_ACTORS.include?($game_party.actors[@status_window.index].id)
  363.           # ブザー SE を演奏
  364.           $game_system.se_play($data_system.buzzer_se)
  365.           return
  366.         end
  367.         # 決定 SE を演奏
  368.         $game_system.se_play($data_system.decision_se)
  369.         # メンバーの入れ替え一人目の決定
  370.         @status_window.index2 = @status_window.index
  371.       else
  372.         if UNMOVABLE_ACTORS.include?($game_party.actors[@status_window.index].id)
  373.           # ブザー SE を演奏
  374.           $game_system.se_play($data_system.buzzer_se)
  375.           return
  376.         end
  377.         # どちらかが戦闘メンバー かつ どちらかが戦闘禁止アクター の場合
  378.         if (@status_window.index < FRONT_MEMBER_LIMIT or
  379.             @status_window.index2 < FRONT_MEMBER_LIMIT) and
  380.            (UMBATTLABLE_ACTORS.include?($game_party.actors[@status_window.index].id) or
  381.             UMBATTLABLE_ACTORS.include?($game_party.actors[@status_window.index2].id))
  382.           # ブザー SE を演奏
  383.           $game_system.se_play($data_system.buzzer_se)
  384.           return
  385.         end
  386.         # どちらかが待機メンバー かつ どちらかが待機禁止アクター の場合
  387.         if (@status_window.index >= FRONT_MEMBER_LIMIT or
  388.             @status_window.index2 >= FRONT_MEMBER_LIMIT) and
  389.            (FORCETOBATTLE_ACTORS.include?($game_party.actors[@status_window.index].id) or
  390.             FORCETOBATTLE_ACTORS.include?($game_party.actors[@status_window.index2].id))
  391.           # ブザー SE を演奏
  392.           $game_system.se_play($data_system.buzzer_se)
  393.           return
  394.         end
  395.         # 決定 SE を演奏
  396.         $game_system.se_play($data_system.decision_se)
  397.         # メンバーの入れ替え二人目の決定と入れ替えの実行
  398.         actor2 = $game_party.actors[@status_window.index]
  399.         actor = $game_party.actors[@status_window.index2]
  400.         $game_party.actors[@status_window.index2] = actor2
  401.         $game_party.actors[@status_window.index] = actor
  402.         @status_window.index = @status_window.index2
  403.         @status_window.index2 = -1
  404.         # プレイヤーをリフレッシュ
  405.         $game_player.refresh
  406.         # ステータスウィンドウをリフレッシュ
  407.         @status_window.refresh
  408.       end
  409.       return
  410.     end
  411.   end
  412. end
  413.  
  414. #============================================================================================
  415. # 本脚本来自[url]www.66RPG.com[/url],转载和使用请保留此信息
  416. #============================================================================================
  417.  
  418. # ▼▲▼ XRXS26BX. +BUZZデザイン ▼▲▼ built 033109
  419. # by 桜雅 在土
  420.  
  421. #==============================================================================
  422. # □ 初始化定义
  423. #==============================================================================
  424. class Window_MenuStatus < Window_Selectable
  425.   #
  426.   # 不显示能力值的角色编号
  427.   #
  428.   NO_PARAMETER_ACTORS = []
  429. end
  430. #==============================================================================
  431. # ■ Window_MenuStatus
  432. #==============================================================================
  433. class Window_MenuStatus < Window_Selectable
  434.   #--------------------------------------------------------------------------
  435.   # ○ インクルード
  436.   #--------------------------------------------------------------------------
  437.   include XRXS26
  438.   #--------------------------------------------------------------------------
  439.   # ● 公開インスタンス変数
  440.   #--------------------------------------------------------------------------
  441.   attr_reader   :newitem_window
  442.   attr_reader   :bottomkeyhelp_window
  443.   #--------------------------------------------------------------------------
  444.   # ● オブジェクト初期化
  445.   #--------------------------------------------------------------------------
  446.   alias xrxs26bx_initialize initialize
  447.   def initialize
  448.     # 呼び戻す
  449.     xrxs26bx_initialize
  450.     # 寄生してウィンドウを作成
  451.     # ボトルキーヘルプウィンドウ
  452.     @bottomkeyhelp_window = Window_BottomKeyHelp.new
  453.     @bottomkeyhelp_window.visible = false
  454.     # 設定変更
  455.     self.height   = 448
  456.     self.contents = Bitmap.new(width - 32, height - 32)
  457.     refresh
  458.   end
  459.   #--------------------------------------------------------------------------
  460.   # ● リフレッシュ
  461.   #--------------------------------------------------------------------------
  462.   def refresh
  463.     self.contents.clear
  464.     @item_max = $game_party.actors.size
  465.     @column_max = 2
  466.     y = (FRONT_MEMBER_LIMIT+1)/2 * 64 + 50
  467.     self.contents.font.size = 16
  468.     self.contents.font.color = system_color
  469.     self.contents.draw_text(4, 0, 92, 28, "战斗角色")
  470.     self.contents.draw_text(4, y, 92, 28, "待机角色")
  471.     for i in 0...$game_party.actors.size
  472.       x = 64 + i%2 * 224
  473.       y = i/2 *  72 + 24
  474.       actor = $game_party.actors[i]
  475.       if i >= FRONT_MEMBER_LIMIT
  476.         y += 32
  477.         self.contents.font.color = disabled_color
  478.         self.contents.draw_text(x, y, 120, 32, actor.name)
  479.       else
  480.         draw_actor_name(actor   , x     , y     )
  481.       end
  482.       draw_actor_graphic(actor, x - 40, y + 64)
  483.       unless NO_PARAMETER_ACTORS.include?(actor.id)
  484.         draw_actor_level(actor  , x + 94, y     )
  485.         draw_actor_hp(actor     , x, y + 16)
  486.         draw_actor_sp(actor     , x, y + 32)
  487.         draw_actor_state(actor  , x, y + 48)
  488.       end
  489.     end
  490.   end
  491.   #--------------------------------------------------------------------------
  492.   # ○ フレーム更新
  493.   #--------------------------------------------------------------------------
  494.   def update
  495.     # ウィンドウを更新
  496.     @bottomkeyhelp_window.update
  497.     super
  498.   end
  499.   #--------------------------------------------------------------------------
  500.   # ○ 解放
  501.   #--------------------------------------------------------------------------
  502.   def dispose
  503.     @bottomkeyhelp_window.dispose
  504.     super
  505.   end
  506.   #--------------------------------------------------------------------------
  507.   # ● カーソルの矩形更新
  508.   #--------------------------------------------------------------------------
  509.   def update_cursor_rect
  510.     if @index < 0
  511.       self.cursor_rect.empty
  512.     else
  513.       y = @index/2 * 72 + 28
  514.       if @index >= FRONT_MEMBER_LIMIT
  515.         y += 32
  516.       end
  517.       self.cursor_rect.set(@index%2 * 224, y, 224, 72)
  518.     end
  519.   end
  520. end
  521. #==============================================================================
  522. # ■ Scene_Menu
  523. #==============================================================================
  524. class Scene_Menu
  525.   #--------------------------------------------------------------------------
  526.   # ● フレーム更新
  527.   #--------------------------------------------------------------------------
  528.   alias xrxs26bx_update update
  529.   def update
  530.     # 登録
  531.     if @bottomkeyhelp_window.nil?
  532.       @bottomkeyhelp_window = @status_window.bottomkeyhelp_window
  533.       @bottomkeyhelp_window.visible = true
  534.       set_keyhelp1
  535.     end
  536.     # 呼び戻す
  537.     xrxs26bx_update
  538.   end
  539.   #--------------------------------------------------------------------------
  540.   # ● フレーム更新 (コマンドウィンドウがアクティブの場合)
  541.   #--------------------------------------------------------------------------
  542.   alias xrxs26bx_update_command update_command
  543.   def update_command
  544.     # 呼び戻す
  545.     xrxs26bx_update_command
  546.     # 入れ替え移行キーが押されたとき
  547.     if @command_window.index == -1 and @status_window.active
  548.       set_keyhelp2
  549.     end
  550.   end
  551.   #--------------------------------------------------------------------------
  552.   # ● フレーム更新 (ステータスウィンドウがアクティブの場合)
  553.   #--------------------------------------------------------------------------
  554.   alias xrxs26bx_update_status update_status
  555.   def update_status
  556.     # 保存
  557.     last_index = @status_window.index2
  558.     # 呼び戻す
  559.     xrxs26bx_update_status
  560.     #
  561.     if last_index != @status_window.index2
  562.       # 一人目を選択した場合
  563.       if @status_window.index2 >= 0
  564.         set_keyhelp3
  565.       else
  566.         set_keyhelp2
  567.       end
  568.     end
  569.     # 戻った場合
  570.     unless @status_window.active
  571.       set_keyhelp1
  572.     end
  573.   end
  574.   #--------------------------------------------------------------------------
  575.   # ○ キーヘルプを設定 1
  576.   #--------------------------------------------------------------------------
  577.   def set_keyhelp1
  578.     @bottomkeyhelp_window.clear
  579.     @bottomkeyhelp_window.add("B","关闭本窗口")
  580.     @bottomkeyhelp_window.add("C","确定")
  581.     @bottomkeyhelp_window.add("→","人物顺序调整")
  582.   end
  583.   #--------------------------------------------------------------------------
  584.   # ○ キーヘルプを設定 2
  585.   #--------------------------------------------------------------------------
  586.   def set_keyhelp2
  587.     @bottomkeyhelp_window.clear
  588.     @bottomkeyhelp_window.add("←,B","返回")
  589.     @bottomkeyhelp_window.add("C","第一个人物确定")
  590.   end
  591.   #--------------------------------------------------------------------------
  592.   # ○ キーヘルプを設定 3
  593.   #--------------------------------------------------------------------------
  594.   def set_keyhelp3
  595.     @bottomkeyhelp_window.clear
  596.     @bottomkeyhelp_window.add("B","返回")
  597.     @bottomkeyhelp_window.add("C","第二个人物确定")
  598.   end
  599. end
  600.  
  601.  
  602.  
  603. #==============================================================================
  604. # □ Window_BottomKeyHelp
  605. #------------------------------------------------------------------------------
  606. #     画面下で操作説明をする透明なウィンドウです。
  607. #==============================================================================
  608. class Window_BottomKeyHelp < Window_Base
  609.   #--------------------------------------------------------------------------
  610.   # ○ オブジェクト初期化
  611.   #--------------------------------------------------------------------------
  612.   def initialize
  613.     super(0, 432, 640, 64)
  614.     self.contents = Bitmap.new(width - 32, height - 32)
  615.     self.opacity = 0
  616.     clear
  617.   end
  618.   #--------------------------------------------------------------------------
  619.   # ○ クリア
  620.   #--------------------------------------------------------------------------
  621.   def clear
  622.     self.contents.clear
  623.     @now_x = 608
  624.   end
  625.   #--------------------------------------------------------------------------
  626.   # ○ 追加
  627.   #--------------------------------------------------------------------------
  628.   def add(key, explanation)
  629.     # 計算
  630.     self.contents.font.size = 20
  631.     x  = self.contents.text_size(key).width
  632.     self.contents.font.size = 16
  633.     x += self.contents.text_size(explanation).width + 8
  634.     @now_x -= x
  635.     # 描写
  636.     self.contents.font.size = 20
  637.     self.contents.font.color = system_color
  638.     self.contents.draw_text(@now_x, 0, x, 32, key, 0)
  639.     self.contents.font.size = 16
  640.     self.contents.font.color = normal_color
  641.     self.contents.draw_text(@now_x, 0, x, 32, explanation, 2)
  642.     # 余白
  643.     @now_x -= 32
  644.   end
  645. end

图片1.png (1.47 MB, 下载次数: 4)

图片1.png

图片2.png (1.43 MB, 下载次数: 5)

图片2.png

Lv4.逐梦者 (版主)

梦石
0
星屑
9497
在线时间
5073 小时
注册时间
2013-6-21
帖子
3580

开拓者贵宾剧作品鉴家

2
发表于 2016-10-1 09:44:52 | 只看该作者
脚本中延续了 RMXP 默认地图显示角色的设定。给当前队伍角色换顺序时,换到第一个的角色就是地图上的行走图。

要判断的话比较简单。只需取出队伍中第一个队员即可
RUBY 代码复制
  1. $game_party.actors[0].id # 获取显示在地图中角色的 ID

点评

可以使用,十分感谢!  发表于 2016-10-1 10:02
回复 支持 2 反对 0

使用道具 举报

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

本版积分规则

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

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

GMT+8, 2024-5-3 08:52

Powered by Discuz! X3.1

© 2001-2013 Comsenz Inc.

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