查看: 4371|回复: 6

[已经解决] 能设定门上的屋顶方块能穿过吗?

[复制链接]
梦石
0
星屑
50
在线时间
262 小时
注册时间
2009-10-13
回帖
84
发表于 2012-11-28 12:11:59 | 显示全部楼层 |阅读模式

加入我们,或者,欢迎回来。

您需要 登录 才可以下载或查看,没有账号?注册会员

×
本帖最后由 我為了下載 于 2012-11-28 18:45 编辑

请问有没有方法能穿过那一格的墙壁?
还是要使用到脚本?
test.jpg

点评

这是什么游戏 = =  发表于 2012-11-28 17:13
梦石
0
星屑
52
在线时间
704 小时
注册时间
2011-12-27
回帖
858
发表于 2012-11-28 12:27:00 来自手机 | 显示全部楼层
利用事件貼那一塊圖塊,再在事件中設置通行設置。
回复

使用道具 举报

梦石
1
星屑
23371
在线时间
9572 小时
注册时间
2012-6-19
回帖
7021

开拓者短篇九导演组冠军

发表于 2012-11-28 12:27:41 来自手机 | 显示全部楼层
把这个图案复制到其他图块组(B、C、D),通行设置设置为星号,门的上方那一格用这个图块来画

点评

不会用shift键吗  发表于 2012-11-30 16:13
应该行不通,因为那个方块组是相连的 假如用事件的话会变成单一怪怪的  发表于 2012-11-28 14:25
回复

使用道具 举报

梦石
1
星屑
23371
在线时间
9572 小时
注册时间
2012-6-19
回帖
7021

开拓者短篇九导演组冠军

发表于 2012-11-28 12:27:53 来自手机 | 显示全部楼层
本帖最后由 喵呜喵5 于 2012-11-28 12:30 编辑

或者弄一张图案一样的行走图,在门的上方设置一个以此为图案的事件,事件优先级定义为在角色上方

点评

应该行不通,因为那个方块组是相连的 假如用事件的话会变成单一怪怪的  发表于 2012-11-28 14:24
回复

使用道具 举报

梦石
0
星屑
23
在线时间
585 小时
注册时间
2012-7-3
回帖
2097
发表于 2012-11-28 12:31:33 | 显示全部楼层
各位都说明了...
他们的方法都可以..
回复

使用道具 举报

梦石
0
星屑
74
在线时间
154 小时
注册时间
2012-10-7
回帖
41
发表于 2012-11-28 12:47:20 | 显示全部楼层
本帖最后由 uuiio797 于 2012-11-28 12:51 编辑

以下是地图区域穿透脚本,LS说的用事件也行。
脚本用法:
先复制脚本到你的工程。
如果要让该图块在人物头上并且穿过就在该图块区域添上区域号码1。
添上区域号码2就表示该区域不能通过。
添上3的话就表示该区域是秘密通道。
脚本来源:http://forums.rpgmakerweb.com/in ... -in-depth-maps-v20/
  1. #××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××=×××
  2. # In-Depth Maps v2.0
  3. # FenixFyreX
  4. # RPG Maker VxAce
  5. #×××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××
  6. # This script allows the player to define two regions:
  7. # overhead ceilings, and blocking tiles.
  8. # When the system finds the overhead ceilings region on top of a tile, it will
  9. # move that tile to the highest layer in the tilemap, and put the tile above
  10. # that tile (y - 1) in it's place on the 'ground', this allows the player to pass
  11. # underneath the tile.
  12. # To turn the system OFF, simply turn the switch defined below ON. To turn it
  13. # on, flip the switch OFF. This allows the user to traverse the 'ceilings' when
  14. # on top of them, but go behind them when on the ground.
  15. #
  16. #×××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××

  17. module Fyx
  18.   module MapDepth
  19.    
  20.     # This is the switch to turn ON to turn the overhead system OFF.
  21.     # Remember, all switches are OFF by default, so the system is ON at startup.
  22.     Switch = 1
  23.    
  24.     # Does the script turn on the switch automatically when each map loads?
  25.     AutoSwitch = true
  26.    
  27.     # This is the region defining tiles that need to be above the player.
  28.     Overhead_Region = 1
  29.    
  30.     # This is the region defining tiles that need to be unpassable no matter
  31.     # what.
  32.     Block_Region = 2
  33.    
  34.     # This is the region to use when defining 'secret passages'. This region
  35.     # ensures that the tiles below it are ALWAYS above and passable.
  36.     Secret_Region = 3
  37.    
  38.     # This is the user defined fall-back for when the system can't obtain a
  39.     # tile to place under overhead tiles.
  40.     Default_Ground_Tile = 2816
  41.   end
  42. end

  43. #×××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××
  44. # Don't edit below unless you know what it means.
  45. #×××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××

  46. class Game_Map
  47.   
  48.   alias setup_no_ceilings setup
  49.   def setup(*a,&bl)
  50.     setup_no_ceilings(*a,&bl)
  51.     if Fyx::MapDepth::AutoSwitch
  52.       $game_switches[ohead_switch] = false
  53.     end
  54.     @old_tileset_flags = tileset.flags
  55.     @ohead_switch = ohead_sys_is_on?
  56.     define_ceilings if ohead_sys_is_on?
  57.   end
  58.   
  59.   def ohead_sys_is_on?
  60.     return false if $game_switches[ohead_switch]
  61.     return true
  62.   end
  63.   
  64.   def ohead_switch
  65.     Fyx::MapDepth::Switch
  66.   end
  67.   
  68.   def ohead_region
  69.     Fyx::MapDepth::Overhead_Region
  70.   end
  71.   
  72.   def block_region
  73.     Fyx::MapDepth::Block_Region
  74.   end
  75.   
  76.   def secret_region
  77.     Fyx::MapDepth::Secret_Region
  78.   end
  79.   
  80.   def default_ground_tile
  81.     Fyx::MapDepth::Default_Ground_Tile
  82.   end
  83.   
  84.   def ceiling_ground_tile(x,y)
  85.     return valid?(x,y-1) ? $game_map.data[x,y-1,0] : default_ground_tile
  86.   end
  87.   
  88.   alias passable_no_ceilings? passable?
  89.   def passable?(*a,&bl)
  90.     if ohead_sys_is_on?
  91.       return false if ceiling_block?(*a,&bl)
  92.     end
  93.     passable_no_ceilings?(*a,&bl)
  94.   end
  95.   
  96.   def ceiling?(x,y)
  97.     region_id(x,y) == ohead_region
  98.   end
  99.   
  100.   def secret_passage?(x,y)
  101.     region_id(x,y) == secret_region
  102.   end
  103.   
  104.   def ceiling_block?(*a,&bl)
  105.     x,y = *a[0...2]
  106.     region_id(x,y) == block_region
  107.   end
  108.   
  109.   def get_ceil_xys(clear=false)
  110.     @ceilings = []
  111.     @ceiling_blocks = []
  112.     @pass_ceilings = []
  113.     if clear
  114.       @map = load_data(sprintf("Data/Map%03d.rvdata2", @map_id))
  115.       tileset.flags = @old_tileset_flags
  116.       return nil
  117.     end
  118.     height.times do |y|
  119.       width.times do |x|
  120.         @ceilings << [x,y] if ceiling?(x,y)
  121.         @pass_ceilings << [x,y] if secret_passage?(x,y)
  122.         @ceiling_blocks << [x,y] if ceiling_block?(x,y)
  123.       end
  124.     end
  125.   end
  126.   
  127.   def define_ceilings
  128.     get_ceil_xys
  129.     @ceilings.each do |x,y|
  130.       tid = $game_map.data[x,y,0]
  131.       tileset.flags[tid] = 0x10
  132.       $game_map.data[x,y,2] = tid
  133.       $game_map.data[x,y,0] = ceiling_ground_tile(x,y)
  134.     end
  135.     @pass_ceilings.each do |x,y|
  136.       tid = $game_map.data[x,y,0]
  137.       tileset.flags[tid] = 0x10
  138.       $game_map.data[x,y,2] = tid
  139.       $game_map.data[x,y,0] = default_ground_tile
  140.     end
  141.   end
  142.   
  143.   alias update_no_ceilings update
  144.   def update(*a,&bl)
  145.     if @ohead_switch != ohead_sys_is_on?
  146.       @ohead_switch = ohead_sys_is_on?
  147.       if ohead_sys_is_on?
  148.         define_ceilings
  149.       else
  150.         get_ceil_xys(true)
  151.       end
  152.     end
  153.     update_no_ceilings(*a,&bl)
  154.   end
  155. end
  156. #×××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××
  157. # ×END OF SCRIPT×
  158. #×××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××
复制代码

点评

还是不太懂1号的用途,目前只知道3号似乎是怎样也能通行  发表于 2012-11-30 14:41
发现了1和3有些不同,就是如果该区域上面有图块挡住号码1的区域就不能通行,号码3的区域则是相反可以通过的,所以是秘密通道。  发表于 2012-11-28 20:35
嗯,用起来一样。  发表于 2012-11-28 20:25
刚发现是不是3和1的,不能互相通行吗?  发表于 2012-11-28 17:54
应该吧,不同的只是秘密通道和在角色头上的图块而已。  发表于 2012-11-28 14:30

评分

参与人数 1梦石 +1 收起 理由
Mic_洛洛 + 1 认可答案,好人卡+1

查看全部评分

回复

使用道具 举报

梦石
0
星屑
74
在线时间
154 小时
注册时间
2012-10-7
回帖
41
发表于 2012-11-30 14:51:52 | 显示全部楼层
uuiio797 发表于 2012-11-28 12:47
以下是地图区域穿透脚本,LS说的用事件也行。
脚本用法:
先复制脚本到你的工程。


1号的用途:
当图上B图块的上方A图块没有任何图块挡住时就能通行,B图块就是遮挡的图块建筑。
2012-11-30_145433.png
回复

使用道具 举报

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

本版积分规则

Powered by Discuz! X5.0 © 2001-2026 Discuz! Team.

在本版发帖返回顶部