if mouse_x > event.screen_x - event_width / 2 and mouse_x < event.screen_x + event_width / 2 and mouse_y + 32 > event.screen_y + 32 - event_height and mouse_y + 32 < event.screen_y + 32
way_x = $game_player.x - event.x
way_y = $game_player.y - event.y
#if ([1, -1].include?($game_player.x-event.x) and $game_player.y-event.y == 0) or ([1, -1].include?($game_player.y-event.y) and $game_player.x-event.x == 0)
if ($game_player.x-event.x).abs + ($game_player.y-event.y).abs < 5
for i in 0...event.list.size
if ["Item","Npc","Enemy"].include?(event.list[i].parameters[0]) #当事件属于自定义事件
还是请这样吧
if Mouse.press?(Mouse::LEFT)
for event in $game_map.events.values
if event.screen_x/32 == mouse_x/32 and event.screen_y/32-1 == mouse_y/32
event.start if event.trigger < 3
end
end
end
我也没找到 允许 不允许 这几个判断作者: 亿万星辰 时间: 2009-5-3 01:52
要通过注释判断,怎么也得有个对 event.list.code 这玩意的判断吧…………作者: ☆流星☆~~~ 时间: 2009-5-3 01:57
提示: 作者被禁止或删除 内容自动屏蔽作者: hitlerson 时间: 2009-5-3 02:02
event.start if event.trigger < 3 and event.list[0].parameters[0] == "允许"
流星啊流星。。。。。。。。。。作者: ☆流星☆~~~ 时间: 2009-5-3 02:21
提示: 作者被禁止或删除 内容自动屏蔽作者: hitlerson 时间: 2009-5-3 02:27
if $game_switches[123]
if Mouse.trigger?(Mouse::LEFT)
for event in $game_map.events.values
#p event.id
if event.screen_x/32 == mouse_x/32 and event.screen_y/32-1 == mouse_y/32
event.start if event.trigger < 3 and event.list[0].parameters[0] != "不允许"
end
end
end
self_update
return
end