| 
 
| 赞 | 0 |  
| VIP | 6 |  
| 好人卡 | 0 |  
| 积分 | 1 |  
| 经验 | 4426 |  
| 最后登录 | 2012-9-6 |  
| 在线时间 | 21 小时 |  
 Lv1.梦旅人 
	梦石0 星屑50 在线时间21 小时注册时间2008-4-26帖子338 | 
| 把这段脚本放进去吧,应该对你有用 
 #==============================================================================
 # ■ Game_Event
 #------------------------------------------------------------------------------
 #  处理事件的类。条件判断、事件页的切换、并行处理、执行事件功能
 # 在 Game_Map 类的内部使用。
 #==============================================================================
 class Game_Event < Game_Character
 #..............................................................................
 #--------------------------------------------------------------------------
 # ● 向左下移动
 #--------------------------------------------------------------------------
 def move_lower_left
 # 没有固定面向的场合
 unless @direction_fix
 # 朝向是右的情况下适合的面是左面、朝向是上的情况下适合的面是下面
 @direction = 1#(@direction == 6 ? 4 : @direction == 8 ? 2 : @direction)
 end
 # 下→左、左→下 的通道可以通行的情况下
 if (passable?(@x, @y, 2) and passable?(@x, @y + 1, 4)) or
 (passable?(@x, @y, 4) and passable?(@x - 1, @y, 2))
 # 更新坐标
 @x -= 1
 @y += 1
 # 增加步数
 increase_steps
 end
 end
 #--------------------------------------------------------------------------
 # ● 向右下移动
 #--------------------------------------------------------------------------
 def move_lower_right
 # 没有固定面向的场合
 unless @direction_fix
 # 朝向是右的情况下适合的面是左面、朝向是上的情况下适合的面是下面
 @direction = 3#(@direction == 4 ? 6 : @direction == 8 ? 2 : @direction)
 end
 # 下→右、右→下 的通道可以通行的情况下
 if (passable?(@x, @y, 2) and passable?(@x, @y + 1, 6)) or
 (passable?(@x, @y, 6) and passable?(@x + 1, @y, 2))
 # 更新坐标
 @x += 1
 @y += 1
 # 增加步数
 increase_steps
 end
 end
 #--------------------------------------------------------------------------
 # ● 向左上移动
 #--------------------------------------------------------------------------
 def move_upper_left
 # 没有固定面向的场合
 unless @direction_fix
 # 朝向是右的情况下适合的面是左面、朝向是上的情况下适合的面是下面
 @direction = 7#(@direction == 6 ? 4 : @direction == 2 ? 8 : @direction)
 end
 # 上→左、左→上 的通道可以通行的情况下
 if (passable?(@x, @y, 8) and passable?(@x, @y - 1, 4)) or
 (passable?(@x, @y, 4) and passable?(@x - 1, @y, 8))
 # 更新坐标
 @x -= 1
 @y -= 1
 # 增加步数
 increase_steps
 end
 end
 #--------------------------------------------------------------------------
 # ● 向右上移动
 #--------------------------------------------------------------------------
 def move_upper_right
 # 没有固定面向的场合
 unless @direction_fix
 # 朝向是右的情况下适合的面是左面、朝向是上的情况下适合的面是下面
 @direction = 9#(@direction == 4 ? 6 : @direction == 2 ? 8 : @direction)
 end
 # 上→右、右→上 的通道可以通行的情况下
 if (passable?(@x, @y, 8) and passable?(@x, @y - 1, 6)) or
 (passable?(@x, @y, 6) and passable?(@x + 1, @y, 8))
 # 更新坐标
 @x += 1
 @y -= 1
 # 增加步数
 increase_steps
 end
 end
 end
 | 
 |