Project1

标题: 请教这句脚本放在事件的脚本框里怎么换行 [打印本页]

作者: typhon_524    时间: 2009-11-16 16:15
标题: 请教这句脚本放在事件的脚本框里怎么换行
有一句比较长,该怎么换行?
  1. for i in 1..10
  2.   if $game_map.terrain_tag($game_player.x, $game_player.y)==$game_map.terrain_tag($game_map.events[i].x, $game_map.events[i].y)
  3.     p "同一地形"
  4.   end
  5. end
复制代码

作者: 夏季冰川    时间: 2009-11-16 16:42
用个笨办法,不知道行不行:
  1. v1=$game_player.x
  2. v2=$game_player.y
  3. for i in 1..10
  4. v3=$game_map.events[i].x
  5. v4=$game_map.events[i].y
  6. v5=$game_map.terrain_tag(v1,v2)
  7. v6=$game_map.terrain_tag(v3,v4)
  8.   if v5==v6
  9.     p "同一地形"
  10.   end
  11. end
复制代码

作者: 上帝的眼睛    时间: 2009-11-16 22:50

  1. class Interpreter  
  2.   def godseyes
  3.     for i in 1..10

  4.   if $game_map.terrain_tag($game_player.x, $game_player.y)==$game_map.terrain_tag($game_map.events[i].x, $game_map.events[i].y)

  5.     p "同一地形"

  6.   end

  7. end
  8. end
  9.   end
复制代码
放在脚本编辑器的最后
调用时输入godseyes即可
作者: 紫苏    时间: 2009-11-17 00:20
  1. for i in 1..10
  2.   if $game_map.terrain_tag($game_player.x,
  3.     $game_player.y) ==
  4.       $game_map.terrain_tag(
  5.         $game_map.events[i].x,
  6.         $game_map.events[i].y)
  7.     p "同一地形"
  8.   end
  9. end
复制代码





欢迎光临 Project1 (https://rpg.blue/) Powered by Discuz! X3.1