Jump to content
Sign in to follow this  
rpgmakers

characters behind walls? [SOLVED]

Recommended Posts

Hello, is it posible to have characters be able to step behind walls like in the picture below:

post-26572-0-30673400-1367327362_thumb.png

To change the characters z priority related to the wall tiles somehow.

Thanks.

Edited by rpgmakers

Share this post


Link to post
Share on other sites

Well, in the tileset in the database, you would change the passable setting from a circle or square to a star.  However, this would require 1 of 2 things.  Your character sprite to be larger than 1 square (for example, the default character sprites wouldn't work) OR the tile would need to only cover up half a square (which most "wall" tiles aren't going to do.)

Share this post


Link to post
Share on other sites

Thanks, but the wall tile I'm using only let's me to change it to a circle, that means below the character. No, the passability is not gonna cut it, it must be scripted. I've seen this done for RPG Maker VX, I just couldn't find the script anymore and I think XP had this feature by default.

 

Edit:

Here is it, I found it, Original Wij's script for RMVX. I just can't get it to work with Ace. Hope someone helps me:

#==============================================================================
# Overhead Ceilings
#==============================================================================
# Author : OriginalWij
# Version : 1.2
#==============================================================================

#==============================================================================
# v1.0
# - Initial release
# v1.1
# - Made ceiling passability dependent on adjacent tile
# - Added auto-shadow work-around fix
# v1.2
# - Added ceiling passability dependent on adjacent tile option
# (now works with "above" or "same level" tiles)
# - Added detection of adjacent water/lava tiles
#==============================================================================

#==============================================================================
# This script automatically restores the overhead function of "ceiling" tiles
# for the A3 (roof) and A4 (wall-top) tilesets like it was in RM2K3/RMXP.
#==============================================================================

#==============================================================================
# NOTE: Auto-Shadows are disabled for the "ceiling" tiles because of their new
# orientation. They will still show in the editor, but not in-game.
#==============================================================================

#==============================================================================
# AUTO-SHADOW FIX:
#
# To re-enable auto-shadows for "ceiling" tiles:
# 1) Change the REPLACEMENT_TILE number as stated below. (2840 → 7760)
# 2) Change the passability of the "purple-vine" wall-top tile, (ID# 7760)
# located in Tab A, to "below" character. (change it from 'X' to 'O')
#
# NOTE: The "purple-vine" wall-top tile will be no longer be usable as a
# wall-top tile if this fix is used. (can be used for flooring, though)
#==============================================================================

#==============================================================================
# TO CHANGE ADJACENT TILE CEILING BLOCKING:
#
# $game_map.block_tile = true/false
#
# false = ceiling not passable if adjacent tile is ABOVE (☆)
# true = ceiling not passable if adjacent tile is SAME LEVEL (X)
#
#==============================================================================

#==============================================================================
# Game_Map
#==============================================================================

class Game_Map
#--------------------------------------------------------------------------
# Public Instance Variables (New)
#--------------------------------------------------------------------------
attr_accessor :block_tile
#--------------------------------------------------------------------------
# Replacement Tile (New)
#--------------------------------------------------------------------------
REPLACEMENT_TILE = 7760 # 2840: change to 7760 if using auto-shadow fix
#--------------------------------------------------------------------------
# Ceiling Tiles (New)
#--------------------------------------------------------------------------
CEILINGS = [4354, 4355, 4358, 4359, 4362, 4363, 4366, 4367, 5122, 5123, 5126,
5127, 5130, 5131, 5134, 5135, 5908, 5909, 5910, 5911, 5921, 5922,
5923, 5924, 5925, 5930, 5931, 5933, 5934, 6676, 6677, 6678, 6679,
6689, 6690, 6691, 6692, 6693, 6698, 6699, 6701, 6702, 7444, 7445,
7446, 7447, 7457, 7458, 7459, 7460, 7461, 7466, 7467, 7469, 7470]
#--------------------------------------------------------------------------
# Initialize (Mod)
#--------------------------------------------------------------------------
alias ow_oc_gm_initialize initialize unless $@
def initialize
ow_oc_gm_initialize
@block_tile = false
initialize_ceilings
end
#--------------------------------------------------------------------------
# Setup (Mod)
#--------------------------------------------------------------------------
alias ow_oc_gm_setup setup unless $@
def setup(map_id)
ow_oc_gm_setup(map_id)
setup_ceilings
end
#--------------------------------------------------------------------------
# Initialize Ceilings (New)
#--------------------------------------------------------------------------
def initialize_ceilings
get_ceilings
for i in @ceilings
$data_system.passages[i] = 0x10
end
end
#--------------------------------------------------------------------------
# Setup Ceilings (New)
#--------------------------------------------------------------------------
def setup_ceilings
get_ceilings
for x in 0...width
for y in 0...height
next if @map.data[x, y, 0] < 4352
if @ceilings.include?(@map.data[x, y, 0])
@map.data[x, y, 2] = @map.data[x, y, 0]
pass = true
for i in [2, 1, 0]
next if y == 0
tile_id = @map.data[x, y - 1, i]
next if tile_id == nil or tile_id == 0
if @block_tile
pass = false if @passages[tile_id] & 0x01 == 0x01
else
pass = false if @passages[tile_id] & 0x10 == 0x10
end
end
@map.data[x, y, 0] = REPLACEMENT_TILE if pass
anim_tile = water_lava?(@map.data[x, y - 1, 0])
@map.data[x, y, 0] = anim_tile if anim_tile != nil
end
end
end
end
#--------------------------------------------------------------------------
# Water or Lava Tile? (New)
#--------------------------------------------------------------------------
def water_lava?(tile)
for i in [2048, 2064, 2072]
return 2048 if i == tile
end
for i in [2096, 2112, 2120]
return 2096 if i == tile
end
for i in [2240, 2256, 2264]
return 2240 if i == tile
end
for i in [2336, 2352, 2360]
return 2336 if i == tile
end
for i in [2432, 2448, 2456]
return 2432 if i == tile
end
for i in [2528, 2544, 2552]
return 2528 if i == tile
end
for i in [2624, 2640, 2648]
return 2624 if i == tile
end
for i in [2720, 2736, 2744]
return 2720 if i == tile
end
return nil
end
#--------------------------------------------------------------------------
# Get Ceilings (New)
#--------------------------------------------------------------------------
def get_ceilings
return if @ceilings != nil
@ceilings = []
for i in 0..7
for id in CEILINGS
@ceilings.push(id + (48 * i))
end
end
end
end
Edited by rpgmakers

Share this post


Link to post
Share on other sites
Guest
This topic is now closed to further replies.
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.

×