查看: 4244|回复: 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
星屑
23236
在线时间
9564 小时
注册时间
2012-6-19
回帖
7018

开拓者短篇九导演组冠军

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

点评

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

使用道具 举报

梦石
1
星屑
23236
在线时间
9564 小时
注册时间
2012-6-19
回帖
7018

开拓者短篇九导演组冠军

发表于 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/
[pre lang="ruby" line="1"]#××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××=×××
# In-Depth Maps v2.0
# FenixFyreX
# RPG Maker VxAce
#×××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××
# This script allows the player to define two regions:
# overhead ceilings, and blocking tiles.
# When the system finds the overhead ceilings region on top of a tile, it will
# move that tile to the highest layer in the tilemap, and put the tile above
# that tile (y - 1) in it's place on the 'ground', this allows the player to pass
# underneath the tile.
# To turn the system OFF, simply turn the switch defined below ON. To turn it
# on, flip the switch OFF. This allows the user to traverse the 'ceilings' when
# on top of them, but go behind them when on the ground.
#
#×××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××

module Fyx
  module MapDepth
   
    # This is the switch to turn ON to turn the overhead system OFF.
    # Remember, all switches are OFF by default, so the system is ON at startup.
    Switch = 1
   
    # Does the script turn on the switch automatically when each map loads?
    AutoSwitch = true
   
    # This is the region defining tiles that need to be above the player.
    Overhead_Region = 1
   
    # This is the region defining tiles that need to be unpassable no matter
    # what.
    Block_Region = 2
   
    # This is the region to use when defining 'secret passages'. This region
    # ensures that the tiles below it are ALWAYS above and passable.
    Secret_Region = 3
   
    # This is the user defined fall-back for when the system can't obtain a
    # tile to place under overhead tiles.
    Default_Ground_Tile = 2816
  end
end

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

class Game_Map
  
  alias setup_no_ceilings setup
  def setup(*a,&bl)
    setup_no_ceilings(*a,&bl)
    if Fyx::MapDepth::AutoSwitch
      $game_switches[ohead_switch] = false
    end
    @old_tileset_flags = tileset.flags
    @ohead_switch = ohead_sys_is_on?
    define_ceilings if ohead_sys_is_on?
  end
  
  def ohead_sys_is_on?
    return false if $game_switches[ohead_switch]
    return true
  end
  
  def ohead_switch
    Fyx::MapDepth::Switch
  end
  
  def ohead_region
    Fyx::MapDepth::Overhead_Region
  end
  
  def block_region
    Fyx::MapDepth::Block_Region
  end
  
  def secret_region
    Fyx::MapDepth::Secret_Region
  end
  
  def default_ground_tile
    Fyx::MapDepth::Default_Ground_Tile
  end
  
  def ceiling_ground_tile(x,y)
    return valid?(x,y-1) ? $game_map.data[x,y-1,0] : default_ground_tile
  end
  
  alias passable_no_ceilings? passable?
  def passable?(*a,&bl)
    if ohead_sys_is_on?
      return false if ceiling_block?(*a,&bl)
    end
    passable_no_ceilings?(*a,&bl)
  end
  
  def ceiling?(x,y)
    region_id(x,y) == ohead_region
  end
  
  def secret_passage?(x,y)
    region_id(x,y) == secret_region
  end
  
  def ceiling_block?(*a,&bl)
    x,y = *a[0...2]
    region_id(x,y) == block_region
  end
  
  def get_ceil_xys(clear=false)
    @ceilings = []
    @ceiling_blocks = []
    @pass_ceilings = []
    if clear
      @map = load_data(sprintf("Data/Map%03d.rvdata2", @map_id))
      tileset.flags = @old_tileset_flags
      return nil
    end
    height.times do |y|
      width.times do |x|
        @ceilings << [x,y] if ceiling?(x,y)
        @pass_ceilings << [x,y] if secret_passage?(x,y)
        @ceiling_blocks << [x,y] if ceiling_block?(x,y)
      end
    end
  end
  
  def define_ceilings
    get_ceil_xys
    @ceilings.each do |x,y|
      tid = $game_map.data[x,y,0]
      tileset.flags[tid] = 0x10
      $game_map.data[x,y,2] = tid
      $game_map.data[x,y,0] = ceiling_ground_tile(x,y)
    end
    @pass_ceilings.each do |x,y|
      tid = $game_map.data[x,y,0]
      tileset.flags[tid] = 0x10
      $game_map.data[x,y,2] = tid
      $game_map.data[x,y,0] = default_ground_tile
    end
  end
  
  alias update_no_ceilings update
  def update(*a,&bl)
    if @ohead_switch != ohead_sys_is_on?
      @ohead_switch = ohead_sys_is_on?
      if ohead_sys_is_on?
        define_ceilings
      else
        get_ceil_xys(true)
      end
    end
    update_no_ceilings(*a,&bl)
  end
end
#×××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××
# ×END OF SCRIPT×
#×××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××
[/pre]

点评

还是不太懂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.

在本版发帖返回顶部