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

Project1

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

[已经解决] 如何让事件在规定图块中行走

[复制链接]

Lv1.梦旅人

梦石
0
星屑
50
在线时间
144 小时
注册时间
2011-11-26
帖子
161
跳转到指定楼层
1
发表于 2012-8-29 19:46:12 | 只看该作者 |只看大图 回帖奖励 |倒序浏览 |阅读模式
就是那种鸭子什么在水里游那种,规定那个事件在指定的图块行走的脚本,急需啊!!!!!!

我去搜索,可结果是:
55555,不知道那位大湿可以帮忙。。。。

Lv3.寻梦者

Assassin-K

梦石
0
星屑
3704
在线时间
2281 小时
注册时间
2012-5-23
帖子
4065

贵宾

2
发表于 2012-8-30 01:01:35 | 只看该作者
同学请看图

打开VA【数据库】
找到【图块】
看见右边的【有害地形】了么?
如果是【△△】则是会扣血的有害地形图块,【 · 】就是不扣血的正常图块
你将你想设定的水属性图块按成【△△】就可以了!
至于想调节地形伤害
就打开脚本编辑器
按Ctrl+Shift+F全局搜索“地形”转至Game_Actor(649行)
然后调一下Return的伤害值就好!
当然,你还可以选择用事件来弄,
不过相对麻烦。
所以方法在此不列出来了。。。

◆ROZONE◆
>洛子又要去流浪地球了……
>如果你看到我在线,又没动静,那只能说明我在挂机……
回复

使用道具 举报

Lv3.寻梦者

伴侣:北岛谜烟

梦石
0
星屑
3302
在线时间
3547 小时
注册时间
2012-8-7
帖子
12181

贵宾

3
发表于 2012-8-30 10:09:59 | 只看该作者
简单的办法
首先你得找个水中游鸭子行走图……
然后设置移动路线……自定义(允许穿透)然后就左右左右木纳的移动吧……重复执行+不需要等待到移动结束

……………………
本人收不到提醒(点评|回复|@人),总之有事情到空间留言一起普通普通
回复

使用道具 举报

Lv1.梦旅人

梦石
0
星屑
50
在线时间
15 小时
注册时间
2006-2-14
帖子
308
4
发表于 2012-8-30 12:18:10 | 只看该作者
设置移动路线,让他在湖里绕圈就可以了
广告栏出售,价格是精品游戏一枚。
回复

使用道具 举报

Lv1.梦旅人

梦石
0
星屑
50
在线时间
116 小时
注册时间
2012-8-12
帖子
61
5
发表于 2012-8-30 12:53:25 | 只看该作者
脚本:YEA移动区域限制    使用方法:用google翻译吧 ! 来源:http://yanflychannel.wordpress.com/rmvxa/
  1. #==============================================================================
  2. #
  3. # ▼ Yanfly Engine Ace - Move Restrict Region v1.02
  4. # -- Last Updated: 2012.01.03
  5. # -- Level: Normal
  6. # -- Requires: n/a
  7. #
  8. #==============================================================================

  9. $imported = {} if $imported.nil?
  10. $imported["YEA-MoveRestrictRegion"] = true

  11. #==============================================================================
  12. # ▼ Updates
  13. # =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  14. # 2012.01.03 - Added Feature: <all restrict: x>
  15. # 2011.12.26 - Bug Fixed: Player Restricted Regions.
  16. # 2011.12.15 - Started Script and Finished.
  17. #
  18. #==============================================================================
  19. # ▼ Introduction
  20. # =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  21. # Not everybody wants NPC's to travel all over the place. With this script, you
  22. # can set NPC's to be unable to move pass tiles marked by a specified Region.
  23. # Simply draw out the area you want to enclose NPC's in on and they'll be
  24. # unable to move past it unless they have Through on. Likewise, there are
  25. # regions that you can prevent the player from moving onto, too!
  26. #
  27. #==============================================================================
  28. # ▼ Instructions
  29. # =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  30. # To install this script, open up your script editor and copy/paste this script
  31. # to an open slot below ▼ Materials/素材 but above ▼ Main. Remember to save.
  32. #
  33. # -----------------------------------------------------------------------------
  34. # Map Notetags - These notetags go in the map notebox in a map's properties.
  35. # -----------------------------------------------------------------------------
  36. # <all restrict: x>
  37. # <all restrict: x, x>
  38. # Players and NPC's on the map will be unable to move past region x even if
  39. # they have the "through" flag set. The only thing that can go past is if the
  40. # player is using the debug through flag. Draw out the area you want to close
  41. # the player and NPC's in with the regions and both will be unable to move onto
  42. # any of those tiles marked by region x. If you want to have more regions
  43. # restrict NPC's, insert multiples of this tag.
  44. #
  45. # <npc restrict: x>
  46. # <npc restrict: x, x>
  47. # NPC's on that map will be unable to move past regions x unless they have a
  48. # "Through" flag on. Draw out the area you want to close NPC's in with the
  49. # regions and the NPC's will be unable to move onto any of those tiles marked
  50. # by region x. If you want to have more regions restrict NPC's, insert
  51. # multiples of this tag.
  52. #
  53. # <player restrict: x>
  54. # <player restrict: x, x>
  55. # Players will not be able to move on tiles marked by region x unless the
  56. # player has a "Through" flag on. Draw out the area you want to close the
  57. # player in with the regions and the player will be unable to move past any of
  58. # those tiles marked by region x. If you want to have more regions restrict the
  59. # player, insert multiples of this tag.
  60. #
  61. #==============================================================================
  62. # ▼ Compatibility
  63. # =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  64. # This script is made strictly for RPG Maker VX Ace. It is highly unlikely that
  65. # it will run with RPG Maker VX without adjusting.
  66. #
  67. #==============================================================================

  68. module YEA
  69.   module MOVE_RESTRICT
  70.    
  71.     #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  72.     # - Default Completely Restricted Regions -
  73.     #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  74.     # If you want there to always be a region ID that will forbid both the
  75.     # player and NPC's from passing through, insert that region ID into the
  76.     # array below. This effect will completely block out both players and NPC's
  77.     # even if they have the "through" flag. However, it does not block the
  78.     # debug_through flag for players.
  79.     #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  80.     DEFAULT_ALL = [61]
  81.    
  82.     #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  83.     # - Default Player Restricted Regions -
  84.     #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  85.     # If you want there to always be a region ID that will forbid the player
  86.     # from passing through, insert that region ID into the array below.
  87.     #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  88.     DEFAULT_PLAYER = [62]
  89.    
  90.     #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  91.     # - Default NPC Restricted Regions -
  92.     #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  93.     # If you want there to always be a region ID that will forbid NPC's from
  94.     # passing through, insert that region ID into the array below.
  95.     #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  96.     DEFAULT_NPC = [63]
  97.    
  98.   end # MOVE_RESTRICT
  99. end # YEA

  100. #==============================================================================
  101. # ▼ Editting anything past this point may potentially result in causing
  102. # computer damage, incontinence, explosion of user's head, coma, death, and/or
  103. # halitosis so edit at your own risk.
  104. #==============================================================================

  105. module YEA
  106.   module REGEXP
  107.   module MAP
  108.    
  109.     ALL_RESTRICT =
  110.       /<(?:ALL_RESTRICT|all restrict):[ ]*(\d+(?:\s*,\s*\d+)*)>/i
  111.     NPC_RESTRICT =
  112.       /<(?:NPC_RESTRICT|npc restrict):[ ]*(\d+(?:\s*,\s*\d+)*)>/i
  113.     PLAYER_RESTRICT =
  114.       /<(?:PLAYER_RESTRICT|player restrict):[ ]*(\d+(?:\s*,\s*\d+)*)>/i
  115.    
  116.   end # MAP
  117.   end # REGEXP
  118. end # YEA

  119. #==============================================================================
  120. # ■ RPG::Map
  121. #==============================================================================

  122. class RPG::Map
  123.   
  124.   #--------------------------------------------------------------------------
  125.   # public instance variables
  126.   #--------------------------------------------------------------------------
  127.   attr_accessor :all_restrict_regions
  128.   attr_accessor :npc_restrict_regions
  129.   attr_accessor :player_restrict_regions
  130.   
  131.   #--------------------------------------------------------------------------
  132.   # common cache: load_notetags_mrr
  133.   #--------------------------------------------------------------------------
  134.   def load_notetags_mrr
  135.     @all_restrict_regions = YEA::MOVE_RESTRICT::DEFAULT_ALL.clone
  136.     @npc_restrict_regions = YEA::MOVE_RESTRICT::DEFAULT_NPC.clone
  137.     @player_restrict_regions = YEA::MOVE_RESTRICT::DEFAULT_PLAYER.clone
  138.     #---
  139.     self.note.split(/[\r\n]+/).each { |line|
  140.       case line
  141.       #---
  142.       when YEA::REGEXP::MAP::NPC_RESTRICT
  143.         $1.scan(/\d+/).each { |num|
  144.         @npc_restrict_regions.push(num.to_i) if num.to_i > 0 }
  145.       when YEA::REGEXP::MAP::PLAYER_RESTRICT
  146.         $1.scan(/\d+/).each { |num|
  147.         @player_restrict_regions.push(num.to_i) if num.to_i > 0 }
  148.       #---
  149.       end
  150.     } # self.note.split
  151.     #---
  152.   end
  153.   
  154. end # RPG::Map

  155. #==============================================================================
  156. # ■ Game_Map
  157. #==============================================================================

  158. class Game_Map
  159.   
  160.   #--------------------------------------------------------------------------
  161.   # alias method: setup
  162.   #--------------------------------------------------------------------------
  163.   alias game_map_setup_mrr setup
  164.   def setup(map_id)
  165.     game_map_setup_mrr(map_id)
  166.     @map.load_notetags_mrr
  167.   end
  168.   
  169.   #--------------------------------------------------------------------------
  170.   # new method: all_restrict_regions
  171.   #--------------------------------------------------------------------------
  172.   def all_restrict_regions
  173.     return @map.all_restrict_regions
  174.   end
  175.   
  176.   #--------------------------------------------------------------------------
  177.   # new method: npc_restrict_regions
  178.   #--------------------------------------------------------------------------
  179.   def npc_restrict_regions
  180.     return @map.npc_restrict_regions
  181.   end
  182.   
  183.   #--------------------------------------------------------------------------
  184.   # new method: player_restrict_regions
  185.   #--------------------------------------------------------------------------
  186.   def player_restrict_regions
  187.     return @map.player_restrict_regions
  188.   end
  189.   
  190. end # Game_Map

  191. #==============================================================================
  192. # ■ Game_CharacterBase
  193. #==============================================================================

  194. class Game_CharacterBase
  195.   
  196.   #--------------------------------------------------------------------------
  197.   # alias method: passable?
  198.   #--------------------------------------------------------------------------
  199.   alias game_characterbase_passable_mrr passable?
  200.   def passable?(x, y, d)
  201.     return false if npc_region_forbid?(x, y, d)
  202.     return false if player_region_forbid?(x, y, d)
  203.     return game_characterbase_passable_mrr(x, y, d)
  204.   end
  205.   
  206.   #--------------------------------------------------------------------------
  207.   # new method: npc_forbid?
  208.   #--------------------------------------------------------------------------
  209.   def npc_region_forbid?(x, y, d)
  210.     return false unless self.is_a?(Game_Event)
  211.     region = 0
  212.     case d
  213.     when 1; region = $game_map.region_id(x-1, y+1)
  214.     when 2; region = $game_map.region_id(x+0, y+1)
  215.     when 3; region = $game_map.region_id(x+1, y+1)
  216.     when 4; region = $game_map.region_id(x-1, y+0)
  217.     when 5; region = $game_map.region_id(x+0, y+0)
  218.     when 6; region = $game_map.region_id(x+1, y+0)
  219.     when 7; region = $game_map.region_id(x-1, y-1)
  220.     when 8; region = $game_map.region_id(x+0, y-1)
  221.     when 9; region = $game_map.region_id(x+1, y-1)
  222.     end
  223.     return true if $game_map.all_restrict_regions.include?(region)
  224.     return false if @through
  225.     return $game_map.npc_restrict_regions.include?(region)
  226.   end
  227.   
  228.   #--------------------------------------------------------------------------
  229.   # new method: player_region_forbid?
  230.   #--------------------------------------------------------------------------
  231.   def player_region_forbid?(x, y, d)
  232.     return false unless self.is_a?(Game_Player)
  233.     return false if debug_through?
  234.     region = 0
  235.     case d
  236.     when 1; region = $game_map.region_id(x-1, y+1)
  237.     when 2; region = $game_map.region_id(x+0, y+1)
  238.     when 3; region = $game_map.region_id(x+1, y+1)
  239.     when 4; region = $game_map.region_id(x-1, y+0)
  240.     when 5; region = $game_map.region_id(x+0, y+0)
  241.     when 6; region = $game_map.region_id(x+1, y+0)
  242.     when 7; region = $game_map.region_id(x-1, y-1)
  243.     when 8; region = $game_map.region_id(x+0, y-1)
  244.     when 9; region = $game_map.region_id(x+1, y-1)
  245.     end
  246.     return true if $game_map.all_restrict_regions.include?(region)
  247.     return false if @through
  248.     return $game_map.player_restrict_regions.include?(region)
  249.   end
  250.   
  251. end # Game_CharacterBase

  252. #==============================================================================
  253. #
  254. # ▼ End of File
  255. #
  256. #==============================================================================
复制代码
回复

使用道具 举报

Lv1.梦旅人

梦石
0
星屑
50
在线时间
144 小时
注册时间
2011-11-26
帖子
161
6
 楼主| 发表于 2012-8-31 08:29:50 | 只看该作者
吾不知 发表于 2012-8-30 12:53
脚本:YEA移动区域限制    使用方法:用google翻译吧 ! 来源:http://yanflychannel.wordpress.com/rmvxa/ ...


#================================================= =============================


▼Yanfly发动机王牌 - 移动限制区域v1.02版

# - 最新更新时间:2012.01.03

- 等级:普通

- 要求:N / A


#================================================= =============================


美元进口= {}如果$ imported.nil中?

美元进口[“YEA - MoveRestrictRegion”] =真


#================================================= =============================

#▼更新

#= - = - = - = - = - = - = - = - = - = - = - = - = - = - = - = - = - = - = - = - = - = - = - = - = - = - = - = - = - = - = - = - = - = - = - = - = - = - =

2012.01.03 - 新增的功能:<all restrict: X>

2011.12.26 - 修正:球员受限制的地区。

#2011.12.15 - 开始脚本和成品。


#================================================= =============================

#▼公司简介

#= - = - = - = - = - = - = - = - = - = - = - = - = - = - = - = - = - = - = - = - = - = - = - = - = - = - = - = - = - = - = - = - = - = - = - = - = - = - =

#不是每个人都希望全国人民代表大会所有的地方旅行。有了这个脚本,你

#可以设置NPC无法移动通瓷砖标记指定的地区。

#简单地绘制出地区要附上全国人民代表大会上,他们将

#无法过去,除非他们通过上移动。同样,也有

#地区,你可以阻止玩家移动到,太!


#================================================= =============================

#▼说明

#= - = - = - = - = - = - = - = - = - = - = - = - = - = - = - = - = - = - = - = - = - = - = - = - = - = - = - = - = - = - = - = - = - = - = - = - = - = - =

#如果要安装这个脚本,脚本编辑器打开你的复制/粘贴此脚本

#▼材料/素材,但高于▼主要的开放式插槽下面。记住要保存。


#------------------------------------------------- ----------------------------

在地图的属性的地图notebox在#地图Notetags的 - 这些notetags。

#------------------------------------------------- ----------------------------

#<all restrict: X>

#<all restrict: x, X>

#玩家和NPC在地图上无法移动过去的区域x即使

#他们有“通过”标志。唯一可以走过去的是,如果

#播放器使用调试通过标志。绘制出你要关闭的

#玩家和NPC在与各区域都将是无法将其移动到

这些瓷砖#任何标记的区域x。如果你想有更多的地区

限制NPC,插入这个标签的倍数。


#<npc restrict: X>

#<npc restrict: x, X>

全国人民代表大会上,地图将无法移动过去的区域x,除非他们有

#“通过”标志。你要关闭全国人民代表大会的绘制出区

地区和全国人民代表大会的,将不能移动到任何那些瓷砖标记的

#X区。如果你想有更多的地区限制NPC,插入

#这个标签的倍数。


#<玩家restrict: X>

#<玩家restrict: x, X>

玩家将无法移动标记的区域x的瓷砖,除非

#播放器有一个“直通”的标志。画出来的,你要关闭

#球员在地区和球员将无法移动过去任何

#砖标志的区域x。如果你想有更多的区域限制

#播放器,插入这个标签的倍数。


#================================================= =============================

#▼兼容性

#= - = - = - = - = - = - = - = - = - = - = - = - = - = - = - = - = - = - = - = - = - = - = - = - = - = - = - = - = - = - = - = - = - = - = - = - = - = - =

#这个脚本是为RPG制作VX王牌的严格。这是极不可能的

#将运行与的RPG制造商VX没有调整。


#================================================= =============================


模块YEA

  模块MOVE_RESTRICT

   
    #= - = - = - = - = - = - = - = - = - = - = - = - = - = - = - = - = - = - = - = - = - = - = - = - = - = - = - = - = - = - = - = - = - = - = - = - = -

    # - 默认完全限制地区 -

    #= - = - = - = - = - = - = - = - = - = - = - = - = - = - = - = - = - = - = - = - = - = - = - = - = - = - = - = - = - = - = - = - = - = - = - = - = -

    #如果你想始终是一个区域ID,将禁止

    #玩家和NPC的通过,插入到该地区的ID

    #下面的数组。这个效果会完全阻止玩家和NPC

    #即使他们有“通过”标志。然而,它不阻止

    #debug_through标志的球员。

    #= - = - = - = - = - = - = - = - = - = - = - = - = - = - = - = - = - = - = - = - = - = - = - = - = - = - = - = - = - = - = - = - = - = - = - = - = -

    DEFAULT_ALL = [61]

   
    #= - = - = - = - = - = - = - = - = - = - = - = - = - = - = - = - = - = - = - = - = - = - = - = - = - = - = - = - = - = - = - = - = - = - = - = - = -

    # - 默认播放器受限制的地区 -

    #= - = - = - = - = - = - = - = - = - = - = - = - = - = - = - = - = - = - = - = - = - = - = - = - = - = - = - = - = - = - = - = - = - = - = - = - = -

    #如果你想始终是一个区域ID,将禁止球员

    #通过,该地区的ID插入到数组中。

    #= - = - = - = - = - = - = - = - = - = - = - = - = - = - = - = - = - = - = - = - = - = - = - = - = - = - = - = - = - = - = - = - = - = - = - = - = -

    DEFAULT_PLAYER = [62]

   
    #= - = - = - = - = - = - = - = - = - = - = - = - = - = - = - = - = - = - = - = - = - = - = - = - = - = - = - = - = - = - = - = - = - = - = - = - = -

    # - 默认全国人大受限制的地区 -

    #= - = - = - = - = - = - = - = - = - = - = - = - = - = - = - = - = - = - = - = - = - = - = - = - = - = - = - = - = - = - = - = - = - = - = - = - = -

    #如果你想始终是一个区域ID,将禁止全国人民代表大会

    #通过插入到该地区的ID下面的阵列。

    #= - = - = - = - = - = - = - = - = - = - = - = - = - = - = - = - = - = - = - = - = - = - = - = - = - = - = - = - = - = - = - = - = - = - = - = - = -

    DEFAULT_NPC = [63]

   
  结束#MOVE_RESTRICT

结束#YEA


#================================================= =============================

▼过去,这点编辑工作的任何可能会导致造成

#电脑损伤,大小便失禁,使用者的头部,昏迷,死亡的爆炸,和/或

#口臭,编辑您自己的风险。

#================================================= =============================


模块YEA

  模块REGEXP

  模块图

   
    ALL_RESTRICT =
      / <(?ALL_RESTRICT所有限制):[] *(\ d +(?:\ * \ * \ d +)*)/ I

    NPC_RESTRICT =
      / <(?NPC_RESTRICT全国人民代表大会限制):[] *(\ d +(?:\ * \ * \ d +)*)/ I

    PLAYER_RESTRICT =
      / <(?PLAYER_RESTRICT |玩家限制):[] *(\ d +(?:\ * \ * \ d +)*)/ I

   
  结束#地图

  结束#REGEXP

结束#YEA


#================================================= =============================

#■RPG ::地图

#================================================= =============================


类RPG ::地图

  

  #------------------------------------------------- -------------------------

  #实例变量

  #------------------------------------------------- -------------------------

  attr_accessor中:all_restrict_regions

  attr_accessor中:npc_restrict_regions

  attr_accessor中:player_restrict_regions

  

  #------------------------------------------------- -------------------------

  #常用的缓存:load_notetags_mrr

  #------------------------------------------------- -------------------------

  高清load_notetags_mrr

    @ all_restrict_regions = YEA :: MOVE_RESTRICT :: DEFAULT_ALL.clone

    @ npc_restrict_regions = YEA :: MOVE_RESTRICT :: DEFAULT_NPC.clone

    @ player_restrict_regions = YEA :: MOVE_RESTRICT :: DEFAULT_PLAYER.clone

    #---

    self.note.split(/ [\ r \ n] + /)。每个{|生产线|

      情况下,行

      #---

      当YEA :: REGEXP ::地图:: NPC_RESTRICT

        $ 1。扫描(/ \ d + /)。每个{|数|
        @如果num.to_i npc_restrict_regions.push(num.to_i)> 0}

      当YEA :: REGEXP ::地图:: PLAYER_RESTRICT

        $ 1。扫描(/ \ d + /)。每个{|数|
        @如果num.to_i player_restrict_regions.push(num.to_i)> 0}

      #---

      结束

    }#self.note.split

    #---

  结束

  

结束RPG ::地图


#================================================= =============================

#■Game_Map

#================================================= =============================


类Game_Map

  

  #------------------------------------------------- -------------------------

  #别名方法:设置

  #------------------------------------------------- -------------------------

  别名game_map_setup_mrr设置

  清晰度设置(MAP_ID)

    game_map_setup_mrr(MAP_ID)

    @ map.load_notetags_mrr

  结束

  

  #------------------------------------------------- -------------------------

  #新方法:all_restrict_regions

  #------------------------------------------------- -------------------------

  高清all_restrict_regions

    [email protected]_restrict_regions

  结束

  

  #------------------------------------------------- -------------------------

  #新方法:npc_restrict_regions

  #------------------------------------------------- -------------------------

  高清npc_restrict_regions

    [email protected]_restrict_regions

  结束

  

  #------------------------------------------------- -------------------------

  #新方法:player_restrict_regions

  #------------------------------------------------- -------------------------

  高清player_restrict_regions

    [email protected]_restrict_regions

  结束

  

结束#Game_Map


#================================================= =============================

#■Game_CharacterBase

#================================================= =============================


类Game_CharacterBase

  

  #------------------------------------------------- -------------------------

  #别名方法:过得去吗?

  #------------------------------------------------- -------------------------

  别名game_characterbase_passable_mrr过得去吗?

  高清过得去吗?(X,Y,D)。

    返回false,如果npc_region_forbid(X,Y,D)。

    返回false,如果player_region_forbid(X,Y,D)。

    公共返回game_characterbase_passable_mrr(X,Y,D)

  结束

  

  #------------------------------------------------- -------------------------

  #新方法:npc_forbid的?

  #------------------------------------------------- -------------------------

  DEF(X,Y,D npc_region_forbid?)

    返回false,除非self.is_a?(Game_Event)

    地区= 0

    情况d

    当1;区域= $ game_map.region_id(x-1和y +1中)

    2区= $ game_map.region_id(X 0,Y +1)

    3,区域= $ game_map.region_id(X +1,Y +1)

    当4;区域= $ game_map.region_id(x-1的,Ŷ0)

    5区= $ game_map.region_id(x 0,y 0)

    6区= $ game_map.region_id(X +1,Y +0)

    当7;区域= $ game_map.region_id(x-1的,γ-1)

    当8个区域= $ game_map.region_id(X 0,Y-1)

    9地区的= $ game_map.region_id(X +1,Y-1)

    结束

    返回TRUE,如果$ game_map.all_restrict_regions.include(地区)?

    @返回false,如果通过

    返回game_map.npc_restrict_regions.include?(地区)

  结束

  

  #------------------------------------------------- -------------------------

  #新方法:player_region_forbid的?

  #------------------------------------------------- -------------------------

  DEF(X,Y,D player_region_forbid?)

    返回false,除非self.is_a?(Game_Player)

    返回false如果debug_through?

    地区= 0

    情况d

    当1;区域= $ game_map.region_id(x-1和y +1中)

    2区= $ game_map.region_id(X 0,Y +1)

    3,区域= $ game_map.region_id(X +1,Y +1)

    当4;区域= $ game_map.region_id(x-1的,Ŷ0)

    5区= $ game_map.region_id(x 0,y 0)

    6区= $ game_map.region_id(X +1,Y +0)

    当7;区域= $ game_map.region_id(x-1的,γ-1)

    当8个区域= $ game_map.region_id(X 0,Y-1)

    9地区的= $ game_map.region_id(X +1,Y-1)

    结束

    返回TRUE,如果$ game_map.all_restrict_regions.include(地区)?

    @返回false,如果通过

    返回game_map.player_restrict_regions.include?(地区)

  结束

  

结束#Game_CharacterBase


#================================================= =============================


#▼文件结束


#================================================= =============================




我看不懂..
回复

使用道具 举报

Lv1.梦旅人

梦石
0
星屑
50
在线时间
144 小时
注册时间
2011-11-26
帖子
161
7
 楼主| 发表于 2012-8-31 08:33:42 | 只看该作者
到底要怎么使用啊~~~
回复

使用道具 举报

Lv1.梦旅人

梦石
0
星屑
50
在线时间
116 小时
注册时间
2012-8-12
帖子
61
8
发表于 2012-8-31 08:37:07 | 只看该作者
经常用下google,你就会明白的,其实很简答的设置地图备注中写 <all restrict: x, x>则所有npc和玩家都无法通过x,x这几个区域(穿透时依然不通过),<npc restrict: x, x> npc无法通过(玩家可通过,穿透时可通过),<player restrict: x, x>玩家不可通过(npc可通过,穿透时可通过),
回复

使用道具 举报

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

本版积分规则

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

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

GMT+8, 2025-7-7 15:26

Powered by Discuz! X3.1

© 2001-2013 Comsenz Inc.

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