Project1

标题: 图标菜单的问题 [打印本页]

作者: Magic    时间: 2008-7-13 06:13
标题: 图标菜单的问题
大家看到这里  我用的是增加逃跑选项的图标菜单脚本

  1. #==========================================================================
  2. # 本脚本来自www.66RPG.com,使用和转载请保留此信息
  3. #==========================================================================

  4. …………………………无关内容我已省略………………………………
  5.   #------------------------------------------------------------------------
  6.   # ● 項目の描画
  7.   #------------------------------------------------------------------------
  8.   def draw_item(index)
  9.     @sprite[index] = Sprite_Icon.new(nil, @commands[index])
  10.     @sprite[index].z = self.z + 1
  11.   end
  12.   def draw_com_name
  13.     @name_sprite = Sprite_Comm_Name.new(nil, get_com_name)
  14.   end
  15.   
  16.   # 更新
  17.   def update
  18.     super
  19.     icon_update
  20.     com_name_update if Momo_IconCommand::COM_NAME_DROW
  21. #    if move_index?
  22.     # 判断当前光标位置
  23.     case @last_index
  24.      when 0 # 攻击
  25.       # 方向键下被按下的情况下
  26.       if Input.repeat?(Input::DOWN)
  27.           # 光标指向物品
  28.           $game_system.se_play($data_system.cursor_se)
  29.           @index = 3      
  30.       end
  31.       # 方向键上被按下的情况下
  32.       if Input.repeat?(Input::UP)
  33.         # 光标指向逃跑
  34.           $game_system.se_play($data_system.cursor_se)
  35.           @index = 4      
  36.       end
  37.       # 方向键右被按下的情况下
  38.       if Input.repeat?(Input::RIGHT)
  39.           # 光标指向防御
  40.           $game_system.se_play($data_system.cursor_se)
  41.           @index = 2      
  42.       end
  43.       # 方向键左被按下的情况下
  44.       if Input.repeat?(Input::LEFT)
  45.         # 光标指向法术
  46.           $game_system.se_play($data_system.cursor_se)
  47.           @index = 1
  48.       end
  49.      when 1 # 法术
  50.       # 方向键下被按下的情况下
  51.       if Input.repeat?(Input::DOWN)
  52.           # 光标指向物品
  53.           $game_system.se_play($data_system.cursor_se)
  54.           @index = 3      
  55.       end
  56.       # 方向键上被按下的情况下
  57.       if Input.repeat?(Input::UP)
  58.         # 光标指向逃跑
  59.           $game_system.se_play($data_system.cursor_se)
  60.           @index = 4      
  61.       end
  62.       # 方向键右被按下的情况下
  63.       if Input.repeat?(Input::RIGHT)
  64.           # 光标指向攻击
  65.           $game_system.se_play($data_system.cursor_se)
  66.           @index = 0      
  67.       end
  68.       # 方向键左被按下的情况下
  69.       if Input.repeat?(Input::LEFT)
  70.         # 光标指向法术
  71.           $game_system.se_play($data_system.cursor_se)
  72.           @index = 1
  73.       end
  74.      when 2 # 防御
  75.       # 方向键下被按下的情况下
  76.       if Input.repeat?(Input::DOWN)
  77.           # 光标指向物品
  78.           $game_system.se_play($data_system.cursor_se)
  79.           @index = 3      
  80.       end
  81.       # 方向键上被按下的情况下
  82.       if Input.repeat?(Input::UP)
  83.         # 光标指向逃跑
  84.           $game_system.se_play($data_system.cursor_se)
  85.           @index = 4      
  86.       end
  87.       # 方向键右被按下的情况下
  88.       if Input.repeat?(Input::RIGHT)
  89.           # 光标指向防御
  90.           $game_system.se_play($data_system.cursor_se)
  91.           @index = 2      
  92.       end
  93.       # 方向键左被按下的情况下
  94.       if Input.repeat?(Input::LEFT)
  95.         # 光标指向攻击
  96.           $game_system.se_play($data_system.cursor_se)
  97.           @index = 0
  98.       end
  99.      when 3 # 物品
  100.       # 方向键下被按下的情况下
  101.       if Input.repeat?(Input::DOWN)
  102.           # 光标指向物品
  103.           $game_system.se_play($data_system.cursor_se)
  104.           @index = 3      
  105.       end
  106.       # 方向键上被按下的情况下
  107.       if Input.repeat?(Input::UP)
  108.         # 光标指向攻击
  109.           $game_system.se_play($data_system.cursor_se)
  110.           @index = 0      
  111.       end
  112.       # 方向键右被按下的情况下
  113.       if Input.repeat?(Input::RIGHT)
  114.           # 光标指向防御
  115.           $game_system.se_play($data_system.cursor_se)
  116.           @index = 2      
  117.       end
  118.       # 方向键左被按下的情况下
  119.       if Input.repeat?(Input::LEFT)
  120.         # 光标指向法术
  121.           $game_system.se_play($data_system.cursor_se)
  122.           @index = 1
  123.       end
  124.      when 4 # 逃跑
  125.       # 方向键下被按下的情况下
  126.       if Input.repeat?(Input::DOWN)
  127.           # 光标指向攻击
  128.           $game_system.se_play($data_system.cursor_se)
  129.           @index = 0      
  130.       end
  131.       # 方向键上被按下的情况下
  132.       if Input.repeat?(Input::UP)
  133.         # 光标指向逃跑
  134.           $game_system.se_play($data_system.cursor_se)
  135.           @index = 4      
  136.       end
  137.       # 方向键右被按下的情况下
  138.       if Input.repeat?(Input::RIGHT)
  139.           # 光标指向防御
  140.           $game_system.se_play($data_system.cursor_se)
  141.           @index = 2      
  142.       end
  143.       # 方向键左被按下的情况下
  144.       if Input.repeat?(Input::LEFT)
  145.         # 光标指向法术
  146.           $game_system.se_play($data_system.cursor_se)
  147.           @index = 1
  148.       end
  149.     end      
  150.       @last_index = self.index
  151. #    end
  152.   end

  153.   …………………………无关内容我已省略
复制代码


他把if move_index?给注释掉了  

于是在选择敌人进行攻击的时候按下Esc键,按常理就会返回到图标菜单,但是却返回后什么图标选项都没有了   应该在什么地方修改啊?

PS:以前的是
if move_index?
@last_index = self.index
{/hx}
作者: redant    时间: 2008-7-13 06:54
Scene_Battle 3
搜索 转向 然后 加上
end_atk(@active_battler.index)

# 转向前一个角色的指令输入
      end_atk(@active_battler.index)
      phase3_prior_actor
不管是转向前一个 还是后一个 都加上 那句话 试试
MS esc后 是转向前一个角色     



作者: Magic    时间: 2008-7-13 20:56
不行




欢迎光临 Project1 (https://rpg.blue/) Powered by Discuz! X3.1