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

Project1

 找回密码
 注册会员
搜索
12
返回列表 发新帖
楼主: SYK1494715212
打印 上一主题 下一主题

[已经解决] 求问怎么让角色在天花板下面

[复制链接]

Lv3.寻梦者

梦石
0
星屑
1961
在线时间
313 小时
注册时间
2020-3-17
帖子
50
11
 楼主| 发表于 2020-3-28 17:54:10 | 只看该作者
Nil2018 发表于 2020-3-28 17:16
dll已删,运行游戏前,必须点一次保存工程。

谢谢,但是这个我已经下载了,而且我想要的是羊村日记那种只有门那里可以过,不是所有天花板都可以通行。
↖这就是个新手,什么都不懂,大佬见谅。
回复 支持 反对

使用道具 举报

Lv4.逐梦者

梦石
5
星屑
1823
在线时间
339 小时
注册时间
2014-4-1
帖子
270
12
发表于 2020-3-28 20:18:45 | 只看该作者
作者告诉你吧
RUBY 代码复制
  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.  
  18. module Fyx
  19.   module MapDepth
  20.  
  21.     # This is the switch to turn ON to turn the overhead system OFF.
  22.     # Remember, all switches are OFF by default, so the system is ON at startup.
  23.     Switch = 1
  24.  
  25.     # Does the script turn on the switch automatically when each map loads?
  26.     AutoSwitch = true
  27.  
  28.     # This is the region defining tiles that need to be above the player.
  29.     Overhead_Region = 1
  30.  
  31.     # This is the region defining tiles that need to be unpassable no matter
  32.     # what.
  33.     Block_Region = 2
  34.  
  35.     # This is the region to use when defining 'secret passages'. This region
  36.     # ensures that the tiles below it are ALWAYS above and passable.
  37.     Secret_Region = 3
  38.  
  39.     # This is the user defined fall-back for when the system can't obtain a
  40.     # tile to place under overhead tiles.
  41.     Default_Ground_Tile = 2816
  42.   end
  43. end
  44.  
  45. #×××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××
  46. # Don't edit below unless you know what it means.
  47. #×××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××
  48.  
  49. class Game_Map
  50.  
  51.   alias setup_no_ceilings setup
  52.   def setup(*a,&bl)
  53.     setup_no_ceilings(*a,&bl)
  54.     if Fyx::MapDepth::AutoSwitch
  55.       $game_switches[ohead_switch] = false
  56.     end
  57.     @old_tileset_flags = tileset.flags
  58.     @ohead_switch = ohead_sys_is_on?
  59.     define_ceilings if ohead_sys_is_on?
  60.   end
  61.  
  62.   def ohead_sys_is_on?
  63.     return false if $game_switches[ohead_switch]
  64.     return true
  65.   end
  66.  
  67.   def ohead_switch
  68.     Fyx::MapDepth::Switch
  69.   end
  70.  
  71.   def ohead_region
  72.     Fyx::MapDepth::Overhead_Region
  73.   end
  74.  
  75.   def block_region
  76.     Fyx::MapDepth::Block_Region
  77.   end
  78.  
  79.   def secret_region
  80.     Fyx::MapDepth::Secret_Region
  81.   end
  82.  
  83.   def default_ground_tile
  84.     Fyx::MapDepth::Default_Ground_Tile
  85.   end
  86.  
  87.   def ceiling_ground_tile(x,y)
  88.     return valid?(x,y-1) ? $game_map.data[x,y-1,0] : default_ground_tile
  89.   end
  90.  
  91.   alias passable_no_ceilings? passable?
  92.   def passable?(*a,&bl)
  93.     if ohead_sys_is_on?
  94.       return false if ceiling_block?(*a,&bl)
  95.     end
  96.     passable_no_ceilings?(*a,&bl)
  97.   end
  98.  
  99.   def ceiling?(x,y)
  100.     region_id(x,y) == ohead_region
  101.   end
  102.  
  103.   def secret_passage?(x,y)
  104.     region_id(x,y) == secret_region
  105.   end
  106.  
  107.   def ceiling_block?(*a,&bl)
  108.     x,y = *a[0...2]
  109.     region_id(x,y) == block_region
  110.   end
  111.  
  112.   def get_ceil_xys(clear=false)
  113.     @ceilings = []
  114.     @ceiling_blocks = []
  115.     @pass_ceilings = []
  116.     if clear
  117.       @map = load_data(sprintf("Data/Map%03d.rvdata2", @map_id))
  118.       tileset.flags = @old_tileset_flags
  119.       return nil
  120.     end
  121.     height.times do |y|
  122.       width.times do |x|
  123.         @ceilings << [x,y] if ceiling?(x,y)
  124.         @pass_ceilings << [x,y] if secret_passage?(x,y)
  125.         @ceiling_blocks << [x,y] if ceiling_block?(x,y)
  126.       end
  127.     end
  128.   end
  129.  
  130.   def define_ceilings
  131.     get_ceil_xys
  132.     @ceilings.each do |x,y|
  133.       tid = $game_map.data[x,y,0]
  134.       tileset.flags[tid] = 0x10
  135.       $game_map.data[x,y,2] = tid
  136.       $game_map.data[x,y,0] = ceiling_ground_tile(x,y)
  137.     end
  138.     @pass_ceilings.each do |x,y|
  139.       tid = $game_map.data[x,y,0]
  140.       tileset.flags[tid] = 0x10
  141.       $game_map.data[x,y,2] = tid
  142.       $game_map.data[x,y,0] = default_ground_tile
  143.     end
  144.   end
  145.  
  146.   alias update_no_ceilings update
  147.   def update(*a,&bl)
  148.     if @ohead_switch != ohead_sys_is_on?
  149.       @ohead_switch = ohead_sys_is_on?
  150.       if ohead_sys_is_on?
  151.         define_ceilings
  152.       else
  153.         get_ceil_xys(true)
  154.       end
  155.     end
  156.     update_no_ceilings(*a,&bl)
  157.   end
  158. end
  159. #×××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××
  160. # ×END OF SCRIPT×
  161. #×××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××

使用方法:在画地图的时候开用区域模式(F7),你想要通过的天花板上画上区域1,周围用区域2来封闭住(不然可以从旁边爬墙),具体操作你自己试试应该就会了

评分

参与人数 1星屑 +100 收起 理由
VIPArcher + 100 认可答案

查看全部评分

回复 支持 反对

使用道具 举报

Lv3.寻梦者

梦石
0
星屑
1961
在线时间
313 小时
注册时间
2020-3-17
帖子
50
13
 楼主| 发表于 2020-3-28 20:20:42 | 只看该作者
funxlww 发表于 2020-3-28 20:18
作者告诉你吧#××××××××××××××××××××××××××××××××××××××××××× ...

谢谢大大!!!!非常感谢!!!!!
↖这就是个新手,什么都不懂,大佬见谅。
回复 支持 反对

使用道具 举报

Lv3.寻梦者

梦石
0
星屑
1961
在线时间
313 小时
注册时间
2020-3-17
帖子
50
14
 楼主| 发表于 2020-3-28 20:24:17 | 只看该作者
funxlww 发表于 2020-3-28 20:18
作者告诉你吧#××××××××××××××××××××××××××××××××××××××××××× ...

试了一下,可以了,非常感谢!!

点评

能够帮到你真是太好了~  发表于 2020-3-28 20:31
↖这就是个新手,什么都不懂,大佬见谅。
回复 支持 反对

使用道具 举报

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

本版积分规则

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

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

GMT+8, 2025-7-21 22:25

Powered by Discuz! X3.1

© 2001-2013 Comsenz Inc.

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