设为首页收藏本站|繁體中文

Project1

 找回密码
 注册会员
搜索
查看: 1837|回复: 5
打印 上一主题 下一主题

[已经过期] [稍微伸手属性]像素行走的问题

[复制链接]

Lv1.梦旅人

虱子

梦石
0
星屑
121
在线时间
1782 小时
注册时间
2010-6-19
帖子
3597
跳转到指定楼层
1
发表于 2012-8-1 00:00:03 | 只看该作者 |只看大图 回帖奖励 |倒序浏览 |阅读模式
本帖最后由 Wind2010 于 2012-8-2 23:36 编辑

以下为Fux兄的像素行走脚本,其中2-33行为自己的添加
四方向行走时没有什么问题,但是八方向行走的话貌似不能和四方向一样绕开障碍?求解如何解决
  1. class Game_Character
  2.   #--------------------------------------------------------------------------
  3.   # ● 向左下移动
  4.   #--------------------------------------------------------------------------
  5.   def move_lower_left(turn_enabled = true,bot=false)
  6.     move_down(!turn_enabled,bot)
  7.     move_left(!turn_enabled,bot)
  8.     @direction = (@direction == 6 ? 4 : @direction == 8 ? 2 : @direction) if turn_enabled and !@direction_fix
  9.   end
  10.   #--------------------------------------------------------------------------
  11.   # ● 向右下移动
  12.   #--------------------------------------------------------------------------
  13.   def move_lower_right(turn_enabled = true,bot=false)
  14.     move_down(!turn_enabled,bot)
  15.     move_right(!turn_enabled,bot)
  16.     @direction = (@direction == 4 ? 6 : @direction == 8 ? 2 : @direction) if turn_enabled and !@direction_fix
  17.   end
  18.   #--------------------------------------------------------------------------
  19.   # ● 向左上移动
  20.   #--------------------------------------------------------------------------
  21.   def move_upper_left(turn_enabled = true,bot=false)
  22.     move_up(!turn_enabled,bot)
  23.     move_left(!turn_enabled,bot)
  24.     @direction = (@direction == 6 ? 4 : @direction == 2 ? 8 : @direction) if turn_enabled and !@direction_fix
  25.   end
  26.   #--------------------------------------------------------------------------
  27.   # ● 向右上移动
  28.   #--------------------------------------------------------------------------
  29.   def move_upper_right(turn_enabled = true,bot=false)
  30.     move_up(!turn_enabled,bot)
  31.     move_right(!turn_enabled,bot)
  32.     @direction = (@direction == 4 ? 6 : @direction == 2 ? 8 : @direction) if turn_enabled and !@direction_fix
  33.   end
  34.   alias:md:move_down
  35.   def move_down(turn_enabled = true,bot=false)
  36.     unless bot
  37.       speed = (2**@move_speed).to_f/128
  38.       if passable?(@x.to_i, (@y+speed).to_i, 2)
  39.         if @x.to_i != @x
  40.           if passable?((@x+0.9).to_i,(@y+speed).to_i, 2)
  41.             turn_down if turn_enabled
  42.             @y += speed
  43.           else
  44.             unless check_event_trigger_touch(@x.to_i+1, (@y+speed).to_i+1)
  45.               @y = (@y+speed).to_i
  46.               @x -= speed
  47.               turn_down if turn_enabled
  48.             else
  49.               turn_down if turn_enabled
  50.             end
  51.           end
  52.         else
  53.           turn_down if turn_enabled
  54.           @y += speed
  55.         end
  56.       else
  57.         if passable?((@x+0.9).to_i,(@y+speed).to_i, 2)
  58.           unless check_event_trigger_touch(@x.to_i, (@y+speed).to_i+1)
  59.             @y = (@y+speed).to_i
  60.             @x += speed
  61.             turn_down if turn_enabled
  62.           else
  63.             turn_down if turn_enabled
  64.           end
  65.         else
  66.           turn_down if turn_enabled
  67.           @y = (@y+speed).to_i
  68.           check_event_trigger_touch(@x.to_i, @y.to_i+1)
  69.         end
  70.       end
  71.     else
  72.       md(turn_enabled)
  73.     end
  74.   end

  75.   alias:ml:move_left
  76.   def move_left(turn_enabled = true,bot=false)
  77.     unless bot
  78.       speed = (2**@move_speed).to_f/128
  79.       if passable?((@x-speed+0.9).to_i,@y.to_i, 4)
  80.         if @y.to_i != @y
  81.           if passable?((@x-speed+0.9).to_i,(@y+0.9).to_i, 4)
  82.             turn_left if turn_enabled
  83.             @x -= speed
  84.           else
  85.             unless check_event_trigger_touch(@x.to_i-1, @y.to_i+1)
  86.               @x = @x.to_i
  87.               @y -= speed
  88.               turn_left if turn_enabled
  89.             else
  90.               turn_left if turn_enabled
  91.             end
  92.           end
  93.         else
  94.           turn_left if turn_enabled
  95.           @x -= speed
  96.         end
  97.       else
  98.         if passable?((@x-speed+0.9).to_i,(@y+0.9).to_i, 4)
  99.           unless check_event_trigger_touch(@x.to_i-1, @y.to_i)
  100.             @x = @x.to_i
  101.             @y += speed
  102.             turn_left if turn_enabled
  103.           else
  104.             turn_left if turn_enabled
  105.           end
  106.         else
  107.           turn_left if turn_enabled
  108.           @x = @x.to_i
  109.           check_event_trigger_touch(@x.to_i-1, @y.to_i)
  110.         end
  111.       end
  112.     else
  113.       ml(turn_enabled)
  114.     end
  115.   end

  116.   alias:mr:move_right
  117.   def move_right(turn_enabled = true,bot=false)
  118.     unless bot
  119.       speed = (2**@move_speed).to_f/128
  120.       if passable?((@x+speed).to_i,@y.to_i, 6)
  121.         if @y.to_i != @y
  122.           if passable?((@x+speed).to_i,(@y+0.9).to_i, 6)
  123.             turn_right if turn_enabled
  124.             @x += speed
  125.           else
  126.             unless check_event_trigger_touch((@x+speed).to_i+1, @y.to_i+1)
  127.               @x = (@x+speed).to_i
  128.               @y -= speed
  129.               turn_right if turn_enabled
  130.             else
  131.               @x = (@x+speed).to_i
  132.               turn_right if turn_enabled
  133.             end
  134.           end
  135.         else
  136.           turn_right if turn_enabled
  137.           @x += speed
  138.         end
  139.       else
  140.         if passable?((@x+speed).to_i,(@y+0.9).to_i, 6)
  141.           unless check_event_trigger_touch((@x+speed).to_i+1, @y.to_i)
  142.             @x = (@x+speed).to_i
  143.             @y += speed
  144.             turn_right if turn_enabled
  145.           else
  146.             @x = (@x+speed).to_i
  147.             turn_right if turn_enabled
  148.           end
  149.         else
  150.           turn_right if turn_enabled
  151.           @x = (@x+speed).to_i
  152.           check_event_trigger_touch(@x.to_i+1, @y.to_i)
  153.         end
  154.       end
  155.     else
  156.       mr(turn_enabled)
  157.     end
  158.   end

  159.   alias:mu:move_up
  160.   def move_up(turn_enabled = true,bot=false)
  161.     unless bot
  162.       speed = (2**@move_speed).to_f/128
  163.       if passable?(@x.to_i, (@y-speed+0.9).to_i, 8)
  164.         if @x.to_i != @x
  165.           if passable?((@x+0.9).to_i,(@y-speed+0.9).to_i, 8)
  166.             turn_up if turn_enabled
  167.             @y -= speed
  168.           else
  169.             unless check_event_trigger_touch(@x.to_i+1, @y.to_i-1)
  170.               @y = @y.to_i
  171.               @x -= speed
  172.               turn_up if turn_enabled
  173.             else
  174.               turn_up if turn_enabled
  175.             end
  176.           end
  177.         else
  178.           turn_up if turn_enabled
  179.           @y -= speed
  180.         end
  181.       else
  182.         if passable?((@x+0.9).to_i,(@y-speed+0.9).to_i, 8)
  183.           unless check_event_trigger_touch(@x.to_i, @y.to_i-1)
  184.             @y = @y.to_i
  185.             @x += speed
  186.             turn_up if turn_enabled
  187.           else
  188.             turn_up if turn_enabled
  189.           end
  190.         else
  191.           turn_up if turn_enabled
  192.           @y = @y.to_i
  193.           check_event_trigger_touch(@x.to_i, @y.to_i-1)
  194.         end
  195.       end
  196.     else
  197.       mu(turn_enabled)
  198.     end
  199.   end
  200.   
  201. end

  202. class Game_Player < Game_Character

  203.   def check_event_trigger_here(triggers)
  204.     result = false
  205.     if $game_system.map_interpreter.running?
  206.       return result
  207.     end
  208.     for event in $game_map.events.values
  209.       if (event.x+0.5).between?(@x,@x+1) and (event.y+0.5).between?(@y,@y+1)and triggers.include?(event.trigger)
  210.         if not event.jumping? and event.over_trigger?
  211.           event.start
  212.           result = true
  213.         end
  214.       end
  215.     end
  216.     return result
  217.   end

  218.   def check_event_trigger_there(triggers)
  219.     result = false
  220.     if $game_system.map_interpreter.running?
  221.       return result
  222.     end
  223.     new_x = @x + (@direction == 6 ? 1 : @direction == 4 ? -1 : 0)
  224.     new_y = @y + (@direction == 2 ? 1 : @direction == 8 ? -1 : 0)
  225.     for event in $game_map.events.values
  226.       if (event.x+0.5).between?(new_x,new_x+1) and (event.y+0.5).between?(new_y,new_y+1)and triggers.include?(event.trigger)
  227.         if not event.jumping? and not event.over_trigger?
  228.           event.start
  229.           result = true
  230.         end
  231.       end
  232.     end
  233.     return result
  234.   end

  235.   def update
  236.     last_moving = moving?
  237.     unless moving? or $game_system.map_interpreter.running? or
  238.            @move_route_forcing or $game_temp.message_window_showing
  239.       case Input.dir8
  240.       when 1
  241.         move_lower_left
  242.       when 2
  243.         move_down(true,false)
  244.       when 3
  245.         move_lower_right
  246.       when 4
  247.         move_left(true,false)
  248.       when 6
  249.         move_right(true,false)
  250.       when 7
  251.         move_upper_left
  252.       when 8
  253.         move_up(true,false)
  254.       when 9
  255.         move_upper_right
  256.       end
  257.     end
  258.     last_real_x = @real_x
  259.     last_real_y = @real_y
  260.     super
  261.     if @real_y > last_real_y and @real_y - $game_map.display_y > CENTER_Y
  262.       $game_map.scroll_down(@real_y - last_real_y)
  263.     end
  264.     if @real_x < last_real_x and @real_x - $game_map.display_x < CENTER_X
  265.       $game_map.scroll_left(last_real_x - @real_x)
  266.     end
  267.     if @real_x > last_real_x and @real_x - $game_map.display_x > CENTER_X
  268.       $game_map.scroll_right(@real_x - last_real_x)
  269.     end
  270.     if @real_y < last_real_y and @real_y - $game_map.display_y < CENTER_Y
  271.       $game_map.scroll_up(last_real_y - @real_y)
  272.     end
  273.     unless moving?
  274.       if last_moving
  275.         result = check_event_trigger_here([1,2])
  276.         if result == false
  277.           unless $DEBUG and Input.press?(Input::CTRL)
  278.             if @encounter_count > 0
  279.               @encounter_count -= 1
  280.             end
  281.           end
  282.         end
  283.       end
  284.       if Input.trigger?(Input::C)
  285.         check_event_trigger_there([0,1,2]) unless check_event_trigger_here([0])
  286.       end
  287.     end
  288.   end
  289. end
复制代码
另外为什么像现在这样的话,事件用接近主角时会无限改变方向?
  1. class Game_Character
  2.   def move_toward(to)
  3.     sx = @x - to.x
  4.     sy = @y - to.y
  5.     if sx == 0 and sy == 0
  6.       return
  7.     end
  8.     abs_sx = sx.abs
  9.     abs_sy = sy.abs
  10.     if abs_sx == abs_sy
  11.       if sx>0 and sy>0
  12.         move_upper_left
  13.       elsif sx>0 and sy<0
  14.         move_lower_left
  15.       elsif sx<0 and sy>0
  16.         move_upper_right
  17.       elsif sx<0 and sy<0
  18.         move_lower_right
  19.       end
  20.     end
  21.     if abs_sx > abs_sy
  22.       sx > 0 ? move_left : move_right
  23.       if not moving? and sy != 0
  24.         sy > 0 ? move_up : move_down
  25.       end
  26.     else
  27.       sy > 0 ? move_up : move_down
  28.       if not moving? and sx != 0
  29.         sx > 0 ? move_left : move_right
  30.       end
  31.     end
  32.   end
  33. end
复制代码

http://rpg.blue/thread-175056-1-2.html
PVZ型塔防物一个
http://rpg.blue/thread-155199-1-2.html
RMXP技术讨论区手动认可帖,得到答案请认可

Lv1.梦旅人

虱子

梦石
0
星屑
121
在线时间
1782 小时
注册时间
2010-6-19
帖子
3597
2
 楼主| 发表于 2012-8-1 23:57:02 | 只看该作者
囧了据说过若干时间可以自顶?不能的话帮忙把这L删掉吧- -

http://rpg.blue/thread-175056-1-2.html
PVZ型塔防物一个
http://rpg.blue/thread-155199-1-2.html
RMXP技术讨论区手动认可帖,得到答案请认可
回复

使用道具 举报

Lv1.梦旅人

虱子

梦石
0
星屑
121
在线时间
1782 小时
注册时间
2010-6-19
帖子
3597
3
 楼主| 发表于 2012-8-2 23:36:41 | 只看该作者
囧了这已经是第二次自顶了,需要我关贴再发一次么

http://rpg.blue/thread-175056-1-2.html
PVZ型塔防物一个
http://rpg.blue/thread-155199-1-2.html
RMXP技术讨论区手动认可帖,得到答案请认可
回复

使用道具 举报

Lv3.寻梦者

双子人

梦石
0
星屑
3165
在线时间
3616 小时
注册时间
2009-4-4
帖子
4154

开拓者

4
发表于 2012-8-3 10:53:31 | 只看该作者
  1. #———————————————————————————————————————
  2. # Game_Character
  3. #———————————————————————————————————————
  4. class Game_Character
  5.   alias:md:move_down
  6.   def move_down(turn_enabled = true,bot=true)
  7.     unless bot
  8.       speed = (2**@move_speed).to_f/128
  9.       if passable?(@x.to_i, (@y+speed).to_i, 2)
  10.         if @x.to_i != @x
  11.           if passable?((@x+0.9).to_i,(@y+speed).to_i, 2)
  12.             turn_down if turn_enabled
  13.             @y += speed
  14.           else
  15.             unless check_event_trigger_touch(@x.to_i+1, (@y+speed).to_i+1)
  16.               @y = (@y+speed).to_i
  17.               @x -= speed
  18.               turn_down if turn_enabled
  19.             else
  20.               turn_down if turn_enabled
  21.             end
  22.           end
  23.         else
  24.           turn_down if turn_enabled
  25.           @y += speed
  26.         end
  27.       else
  28.         if passable?((@x+0.9).to_i,(@y+speed).to_i, 2)
  29.           unless check_event_trigger_touch(@x.to_i, (@y+speed).to_i+1)
  30.             @y = (@y+speed).to_i
  31.             @x += speed
  32.             turn_down if turn_enabled
  33.           else
  34.             turn_down if turn_enabled
  35.           end
  36.         else
  37.           turn_down if turn_enabled
  38.           @y = (@y+speed).to_i
  39.           check_event_trigger_touch(@x.to_i, @y.to_i+1)
  40.         end
  41.       end
  42.     else
  43.       md(turn_enabled)
  44.     end
  45.   end

  46.   alias:ml:move_left
  47.   def move_left(turn_enabled = true,bot=true)
  48.     unless bot
  49.       speed = (2**@move_speed).to_f/128
  50.       if passable?((@x-speed+0.9).to_i,@y.to_i, 4)
  51.         if @y.to_i != @y
  52.           if passable?((@x-speed+0.9).to_i,(@y+0.9).to_i, 4)
  53.             turn_left if turn_enabled
  54.             @x -= speed
  55.           else
  56.             unless check_event_trigger_touch(@x.to_i-1, @y.to_i+1)
  57.               @x = @x.to_i
  58.               @y -= speed
  59.               turn_left if turn_enabled
  60.             else
  61.               turn_left if turn_enabled
  62.             end
  63.           end
  64.         else
  65.           turn_left if turn_enabled
  66.           @x -= speed
  67.         end
  68.       else
  69.         if passable?((@x-speed+0.9).to_i,(@y+0.9).to_i, 4)
  70.           unless check_event_trigger_touch(@x.to_i-1, @y.to_i)
  71.             @x = @x.to_i
  72.             @y += speed
  73.             turn_left if turn_enabled
  74.           else
  75.             turn_left if turn_enabled
  76.           end
  77.         else
  78.           turn_left if turn_enabled
  79.           @x = @x.to_i
  80.           check_event_trigger_touch(@x.to_i-1, @y.to_i)
  81.         end
  82.       end
  83.     else
  84.       ml(turn_enabled)
  85.     end
  86.   end

  87.   alias:mr:move_right
  88.   def move_right(turn_enabled = true,bot=true)
  89.     unless bot
  90.       speed = (2**@move_speed).to_f/128
  91.       if passable?((@x+speed).to_i,@y.to_i, 6)
  92.         if @y.to_i != @y
  93.           if passable?((@x+speed).to_i,(@y+0.9).to_i, 6)
  94.             turn_right if turn_enabled
  95.             @x += speed
  96.           else
  97.             unless check_event_trigger_touch((@x+speed).to_i+1, @y.to_i+1)
  98.               @x = (@x+speed).to_i
  99.               @y -= speed
  100.               turn_right if turn_enabled
  101.             else
  102.               @x = (@x+speed).to_i
  103.               turn_right if turn_enabled
  104.             end
  105.           end
  106.         else
  107.           turn_right if turn_enabled
  108.           @x += speed
  109.         end
  110.       else
  111.         if passable?((@x+speed).to_i,(@y+0.9).to_i, 6)
  112.           unless check_event_trigger_touch((@x+speed).to_i+1, @y.to_i)
  113.             @x = (@x+speed).to_i
  114.             @y += speed
  115.             turn_right if turn_enabled
  116.           else
  117.             @x = (@x+speed).to_i
  118.             turn_right if turn_enabled
  119.           end
  120.         else
  121.           turn_right if turn_enabled
  122.           @x = (@x+speed).to_i
  123.           check_event_trigger_touch(@x.to_i+1, @y.to_i)
  124.         end
  125.       end
  126.     else
  127.       mr(turn_enabled)
  128.     end
  129.   end

  130.   alias:mu:move_up
  131.   def move_up(turn_enabled = true,bot=true)
  132.     unless bot
  133.       speed = (2**@move_speed).to_f/128
  134.       if passable?(@x.to_i, (@y-speed+0.9).to_i, 8)
  135.         if @x.to_i != @x
  136.           if passable?((@x+0.9).to_i,(@y-speed+0.9).to_i, 8)
  137.             turn_up if turn_enabled
  138.             @y -= speed
  139.           else
  140.             unless check_event_trigger_touch(@x.to_i+1, @y.to_i-1)
  141.               @y = @y.to_i
  142.               @x -= speed
  143.               turn_up if turn_enabled
  144.             else
  145.               turn_up if turn_enabled
  146.             end
  147.           end
  148.         else
  149.           turn_up if turn_enabled
  150.           @y -= speed
  151.         end
  152.       else
  153.         if passable?((@x+0.9).to_i,(@y-speed+0.9).to_i, 8)
  154.           unless check_event_trigger_touch(@x.to_i, @y.to_i-1)
  155.             @y = @y.to_i
  156.             @x += speed
  157.             turn_up if turn_enabled
  158.           else
  159.             turn_up if turn_enabled
  160.           end
  161.         else
  162.           turn_up if turn_enabled
  163.           @y = @y.to_i
  164.           check_event_trigger_touch(@x.to_i, @y.to_i-1)
  165.         end
  166.       end
  167.     else
  168.       mu(turn_enabled)
  169.     end
  170.   end

  171. # hys 添加部分——————————————————
  172.   alias:mll:move_lower_left
  173.   def move_lower_left(bot=true)
  174.     unless bot
  175.       move_down(true,false)
  176.       move_left(true,false)
  177.     else
  178.       mll
  179.     end
  180.   end
  181.   
  182.   alias:mlr:move_lower_right
  183.   def move_lower_right(bot=true)
  184.     unless bot
  185.       move_down(true,false)
  186.       move_right(true,false)
  187.     else
  188.       mlr
  189.     end
  190.   end
  191.   
  192.   alias:mul:move_upper_left
  193.   def move_upper_left(bot=true)
  194.     unless bot
  195.       move_up(true,false)
  196.       move_left(true,false)
  197.     else
  198.       mul
  199.     end
  200.   end
  201.   
  202.   alias:mur:move_upper_right
  203.   def move_upper_right(bot=true)
  204.     unless bot
  205.       move_up(true,false)
  206.       move_right(true,false)
  207.     else
  208.       mur
  209.     end
  210.   end
  211. # hys 添加部分——————————————————
  212. end

  213. #———————————————————————————————————————
  214. # Game_Player
  215. #———————————————————————————————————————
  216. class Game_Player < Game_Character

  217.   def check_event_trigger_here(triggers)
  218.     result = false
  219.     if $game_system.map_interpreter.running?
  220.       return result
  221.     end
  222.     for event in $game_map.events.values
  223.       if (event.x+0.5).between?(@x,@x+1) and (event.y+0.5).between?(@y,@y+1)and triggers.include?(event.trigger)
  224.         if not event.jumping? and event.over_trigger?
  225.           event.start
  226.           result = true
  227.         end
  228.       end
  229.     end
  230.     return result
  231.   end

  232.   def check_event_trigger_there(triggers)
  233.     result = false
  234.     if $game_system.map_interpreter.running?
  235.       return result
  236.     end
  237.     new_x = @x + (@direction == 6 ? 1 : @direction == 4 ? -1 : 0)
  238.     new_y = @y + (@direction == 2 ? 1 : @direction == 8 ? -1 : 0)
  239.     for event in $game_map.events.values
  240.       if (event.x+0.5).between?(new_x,new_x+1) and (event.y+0.5).between?(new_y,new_y+1)and triggers.include?(event.trigger)
  241.         if not event.jumping? and not event.over_trigger?
  242.           event.start
  243.           result = true
  244.         end
  245.       end
  246.     end
  247.     return result
  248.   end

  249.   def update
  250.     last_moving = moving?
  251.     unless moving? or $game_system.map_interpreter.running? or
  252.            @move_route_forcing or $game_temp.message_window_showing or
  253.            $game_map.scrolling?
  254. #————————————————————八方向
  255.       if $game_temp.disable._8_direction
  256.         case Input.dir8
  257.         when 2
  258.           move_down(true,$game_temp.disable.pixel_move)
  259.         when 4
  260.           move_left(true,$game_temp.disable.pixel_move)
  261.         when 6
  262.           move_right(true,$game_temp.disable.pixel_move)
  263.         when 8
  264.           move_up(true,$game_temp.disable.pixel_move)
  265.         end
  266.       else
  267.         case Input.dir8
  268.         when 2
  269.           move_down(true,$game_temp.disable.pixel_move)
  270.         when 4
  271.           move_left(true,$game_temp.disable.pixel_move)
  272.         when 6
  273.           move_right(true,$game_temp.disable.pixel_move)
  274.         when 8
  275.           move_up(true,$game_temp.disable.pixel_move)
  276.         when 1
  277.           move_lower_left($game_temp.disable.pixel_move)
  278.         when 3
  279.           move_lower_right($game_temp.disable.pixel_move)
  280.         when 7   
  281.           move_upper_left($game_temp.disable.pixel_move)
  282.         when 9
  283.           move_upper_right($game_temp.disable.pixel_move)
  284.         end
  285.       end
  286. #————————————————————八方向
  287.     end
  288.     last_real_x = @real_x
  289.     last_real_y = @real_y
  290.     super
  291.    
  292.    
  293.     if @real_y > last_real_y and @real_y - $game_map.display_y > CENTER_Y
  294.       $game_map.scroll_down(@real_y - last_real_y)
  295.     end
  296.     if @real_x < last_real_x and @real_x - $game_map.display_x < CENTER_X
  297.       $game_map.scroll_left(last_real_x - @real_x)
  298.     end
  299.     if @real_x > last_real_x and @real_x - $game_map.display_x > CENTER_X
  300.       $game_map.scroll_right(@real_x - last_real_x)
  301.     end
  302.     if @real_y < last_real_y and @real_y - $game_map.display_y < CENTER_Y
  303.       $game_map.scroll_up(last_real_y - @real_y)
  304.     end


  305.     unless moving?
  306.       if last_moving
  307.         result = check_event_trigger_here([1,2])
  308.         if result == false
  309.           unless $DEBUG and Input.press?(Input::CTRL)
  310.             if @encounter_count > 0
  311.               @encounter_count -= 1
  312.             end
  313.           end
  314.         end
  315.       end
  316.       if Input.trigger?(Input::C)
  317.         check_event_trigger_there([0,1,2]) unless check_event_trigger_here([0])
  318.       end
  319.     end
  320.   end
  321.   
  322. end
复制代码
这东西我都整合过的啊……

点评

不是可以编辑帖子的么……怎么了。。  发表于 2012-8-3 11:32
糟了……忘了将“$game_temp.disable.pixel_move”全部替换为“false”  发表于 2012-8-3 10:54
回复

使用道具 举报

Lv1.梦旅人

虱子

梦石
0
星屑
121
在线时间
1782 小时
注册时间
2010-6-19
帖子
3597
5
 楼主| 发表于 2012-8-3 12:13:27 | 只看该作者
hys111111 发表于 2012-8-3 10:53
这东西我都整合过的啊……


目测没有用……怪物该被卡位的时候还是被卡住

http://rpg.blue/thread-175056-1-2.html
PVZ型塔防物一个
http://rpg.blue/thread-155199-1-2.html
RMXP技术讨论区手动认可帖,得到答案请认可
回复

使用道具 举报

Lv1.梦旅人

梦石
0
星屑
120
在线时间
188 小时
注册时间
2014-1-18
帖子
254
6
发表于 2014-1-19 08:31:00 | 只看该作者
这个可以控制速度吗?

点评

sorry!我刚开始不知道...  发表于 2014-1-20 19:40

评分

参与人数 1星屑 -50 收起 理由
myownroc -50 挖坟

查看全部评分

回复

使用道具 举报

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

本版积分规则

拿上你的纸笔,建造一个属于你的梦想世界,加入吧。
 注册会员
找回密码

站长信箱:[email protected]|手机版|小黑屋|无图版|Project1游戏制作

GMT+8, 2024-4-19 15:27

Powered by Discuz! X3.1

© 2001-2013 Comsenz Inc.

快速回复 返回顶部 返回列表