查看: 1693|回复: 1

鼠标如何响应事件?

  [复制链接]
梦石
0
星屑
50
在线时间
55 小时
注册时间
2007-7-11
回帖
89
发表于 2009-3-28 21:59:26 | 显示全部楼层 |阅读模式

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

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

×
在网站中搜寻了一下,不过整了一下,好像还是不能响应。
怎么才能隔着一段距离,
点击人物就能直接对话或者响应事件,
而不是跑到身边才能开启事件或者对话。
以及怎样删除鼠标控制走路。
我的鼠标脚本是来自http://rpg.blue/web/shownews.asp?id=8
版务信息:本贴由楼主自主结贴~
金庸群侠传-我是传奇,全新的开始。
梦石
0
星屑
50
在线时间
4 小时
注册时间
2008-5-5
回帖
73
发表于 2009-3-28 23:24:38 | 显示全部楼层
mouse_x, mouse_y = Mouse.get_mouse_pos
if Mouse.press?(Mouse::LEFT)
if mouse_x > 0 and mouse_x < 320 and
mouse_y > 200 and mouse_y < 480
$game_temp.common_event_id = 1
end
end
则当鼠标点击X(0-320),y(200-480)的范位的时候,会调用公共事件1号。

mouse_x, mouse_y = Mouse.get_mouse_pos
if Mouse.press?(Mouse::RIGHT)
if mouse_x > 0 and mouse_x < 320 and
mouse_y > 200 and mouse_y < 480
$game_temp.common_event_id = 1
end
end
则当鼠标右击X(0-320),y(200-480)的范位的时候,会调用公共事件1号。

mouse_x, mouse_y = Mouse.get_mouse_pos
if mouse_x > 62 and mouse_x < 131 and
mouse_y > 305 and mouse_y < 334
$game_temp.common_event_id = 33
end
则当鼠标停在X(0-320),y(200-480)的范位的时候,会调用公共事件1号。
系统信息:本贴由楼主认可为正确答案,66RPG感谢您的热情解答~
回复

使用道具 举报

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

本版积分规则

Powered by Discuz! X5.0 © 2001-2026 Discuz! Team.

在本版发帖返回顶部