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

Project1

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

[已经解决] 关于鼠标脚本,在使用目标为全体的特技或者物品时的bug

 关闭 [复制链接]

Lv1.梦旅人

梦石
0
星屑
1325
在线时间
19 小时
注册时间
2010-10-2
帖子
2
跳转到指定楼层
1
发表于 2011-4-30 09:30:23 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式

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

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

x
一直觉得奇怪,难道大家都没有发现鼠标的这个巨大bug吗。似乎站上的几个鼠标脚本都有这个问题。
在使用目标为全体的物品时,也能通过鼠标选取对象,但这样目标就变成了一个人。用全体特技的时候更糟糕,如果不用鼠标选取对象,还会弹出错误的对话框。
请问怎么解决。谢谢。

Lv1.梦旅人

綾川司の姫様<

梦石
0
星屑
50
在线时间
796 小时
注册时间
2007-12-20
帖子
4520

贵宾第3届短篇游戏大赛R剧及RMTV组亚军

2
发表于 2011-4-30 11:38:06 | 只看该作者
= =我已经搞不清自家的鼠标脚本修改了多少处了……不过应该就只有这一段而已。
找到你鼠标脚本的Window_Selectable部分,拿如下内容替换:
  1. class Window_Selectable
  2. if @self_alias == nil
  3.    alias self_update update
  4.    @self_alias = true
  5. end
  6. def update
  7.    self_update
  8.    if self.active and @item_max > 0
  9.      index_var = @index
  10.      tp_index = @index
  11.      mouse_x, mouse_y = Mouse.get_mouse_pos
  12.      mouse_not_in_rect = true
  13.     unless @index == -1 and self.is_a?(Window_Target)
  14.      for i in (top_row * @column_max)...[@item_max ,top_row * @column_max + page_item_max].min
  15.        @index = i
  16.        update_cursor_rect
  17.        top_x = self.cursor_rect.x + self.x + 16
  18.        top_y = self.cursor_rect.y + self.y + 16
  19.        bottom_x = top_x + self.cursor_rect.width
  20.        bottom_y = top_y + self.cursor_rect.height
  21.        if (mouse_x > top_x) and (mouse_y > top_y) and
  22.           (mouse_x < bottom_x) and (mouse_y < bottom_y)
  23.          mouse_not_in_rect = false
  24.          if tp_index != @index
  25.            tp_index = @index
  26.            $game_system.se_play($data_system.cursor_se)
  27.          end
  28.          break
  29.        end
  30.      end
  31.     else
  32.        top_x = self.cursor_rect.x + self.x + 16
  33.        top_y = self.cursor_rect.y + self.y + 16
  34.        bottom_x = top_x + self.cursor_rect.width
  35.        bottom_y = top_y + self.cursor_rect.height
  36.        if (mouse_x > top_x) and (mouse_y > top_y) and
  37.           (mouse_x < bottom_x) and (mouse_y < bottom_y)
  38.          mouse_not_in_rect = false
  39.          if tp_index != @index
  40.            tp_index = @index
  41.            $game_system.se_play($data_system.cursor_se)
  42.          end
  43.          end
  44.       end
  45.      if mouse_not_in_rect
  46.        @index = index_var
  47.        update_cursor_rect
  48.        Mouse.click_lock
  49.      else
  50.        Mouse.click_unlock               
  51.      end
  52.    end
  53. end
  54. end
复制代码

评分

参与人数 1星屑 +400 梦石 +2 收起 理由
fux2 + 400 + 2 认可答案~

查看全部评分


生命即是责任。自己即是世界。
回复 支持 反对

使用道具 举报

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

本版积分规则

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

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

GMT+8, 2024-5-16 12:58

Powered by Discuz! X3.1

© 2001-2013 Comsenz Inc.

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