| 赞 | 17  | 
 
| VIP | 0 | 
 
| 好人卡 | 20 | 
 
| 积分 | 36 | 
 
| 经验 | 47059 | 
 
| 最后登录 | 2022-9-28 | 
 
| 在线时间 | 2337 小时 | 
 
 
 
 
 
Lv3.寻梦者 
	- 梦石
 - 0 
 
        - 星屑
 - 3559 
 
        - 在线时间
 - 2337 小时
 
        - 注册时间
 - 2015-8-25
 
        - 帖子
 - 960
 
 
  
 
 | 
	
class Game_Character < Game_CharacterBase 
  def move_toward_character(character) 
    sx = distance_x_from(character.x) 
    sy = distance_y_from(character.y) 
    if sx.abs > sy.abs 
      move_straight(sx > 0 ? 4 : 6) 
      move_straight(sy > 0 ? 8 : 2)  
    elsif sy != 0 
      move_straight(sy > 0 ? 8 : 2) 
      move_straight(sx > 0 ? 4 : 6)  
    end 
  end 
end 
 
刚好在写一点东西,想起以前这个。。插入这段脚本的话,事件在接近命令的时候看起来会像幽灵一样一边走一边瞬移地接近。 
感觉像恐怖题材的演出。。 
 
原因是同时执行了两个方向径向移动。 
 |   
 
 
 
 |