Project1
标题:
关于鼠标脚本,在使用目标为全体的特技或者物品时的bug
[打印本页]
作者:
kkkwjx
时间:
2011-4-30 09:30
标题:
关于鼠标脚本,在使用目标为全体的特技或者物品时的bug
一直觉得奇怪,难道大家都没有发现鼠标的这个巨大bug吗。似乎站上的几个鼠标脚本都有这个问题。
在使用目标为全体的物品时,也能通过鼠标选取对象,但这样目标就变成了一个人。用全体特技的时候更糟糕,如果不用鼠标选取对象,还会弹出错误的对话框。
请问怎么解决。谢谢。
作者:
天圣的马甲
时间:
2011-4-30 11:38
= =我已经搞不清自家的鼠标脚本修改了多少处了……不过应该就只有这一段而已。
找到你鼠标脚本的Window_Selectable部分,拿如下内容替换:
class Window_Selectable
if @self_alias == nil
alias self_update update
@self_alias = true
end
def update
self_update
if self.active and @item_max > 0
index_var = @index
tp_index = @index
mouse_x, mouse_y = Mouse.get_mouse_pos
mouse_not_in_rect = true
unless @index == -1 and self.is_a?(Window_Target)
for i in (top_row * @column_max)...[@item_max ,top_row * @column_max + page_item_max].min
@index = i
update_cursor_rect
top_x = self.cursor_rect.x + self.x + 16
top_y = self.cursor_rect.y + self.y + 16
bottom_x = top_x + self.cursor_rect.width
bottom_y = top_y + self.cursor_rect.height
if (mouse_x > top_x) and (mouse_y > top_y) and
(mouse_x < bottom_x) and (mouse_y < bottom_y)
mouse_not_in_rect = false
if tp_index != @index
tp_index = @index
$game_system.se_play($data_system.cursor_se)
end
break
end
end
else
top_x = self.cursor_rect.x + self.x + 16
top_y = self.cursor_rect.y + self.y + 16
bottom_x = top_x + self.cursor_rect.width
bottom_y = top_y + self.cursor_rect.height
if (mouse_x > top_x) and (mouse_y > top_y) and
(mouse_x < bottom_x) and (mouse_y < bottom_y)
mouse_not_in_rect = false
if tp_index != @index
tp_index = @index
$game_system.se_play($data_system.cursor_se)
end
end
end
if mouse_not_in_rect
@index = index_var
update_cursor_rect
Mouse.click_lock
else
Mouse.click_unlock
end
end
end
end
复制代码
欢迎光临 Project1 (https://rpg.blue/)
Powered by Discuz! X3.1