Jump to content
New account registrations are disabed. This website is now an archive. Read more here.
  • 0
Bob423

[resolved] events that show tilesets

Question

ok, so i have some events that show parts of the tileset, so that it looks like a wall. but for some reason, i can walk right over it. i checked all the passability stuff, and everything looks fine. its so weird

xojzu9.jpgthat wall is made completely of events

shouldnt events that show graphics of any kind be impassible unless you check the "through" box? that just makes sense, doesnt it?

 

in case it changes anything, im using blizz-abs

Edited by Bob423

Share this post


Link to post
Share on other sites

8 answers to this question

Recommended Posts

  • 0

Events that show tiles from tilesets are special - they are passable if said tile is passable as well. If it is configured as impassable, though, there shouldn't be a problem. I wouldn't be surprised if that ABS would have somthing to do with that, but the best way to know for sure is to test in a dummy project with the exact same tileset and without the script.

Share this post


Link to post
Share on other sites
  • 0

So the problem is being cause by your abs system? Is this a known bug with the system?

 

Maybe try getting a fresh version of the abs, possibly it's demo if any, recreate the scenario and see if it has the same issue. This will tell you if the script itself causes the problem, or if it is something that is changed in the one you are using, or some other conflict. If the issue is present in a fresh, unmodified demo version of the script, then it is for sure the script.

Share this post


Link to post
Share on other sites
  • 0

ok, so i have some events that show parts of the tileset, so that it looks like a wall. but for some reason, i can walk right over it. i checked all the passability stuff, and everything looks fine. its so weird

xojzu9.jpgthat wall is made completely of events

shouldnt events that show graphics of any kind be impassible unless you check the "through" box? that just makes sense, doesnt it?

 

in case it changes anything, im using blizz-abs

 

I learned this one the hard way myself a couple of weeks ago. If a Tile Event is set to Through, the Tile it covers is not considered, player is allowed passability, if I remember correctly.

 

The way I fix that is to Not use Through on the Event Flag. You could also consider taking one of the non textured tiles (the invis ones), edit them in Database / Tilesets and turn their Passability bits to Off. Or not bother changing the tileset in the database, but use an Event Tile that is not normally passable, even if it looks off, then make its opacity 0 so it is invisible, but still functions the same way. Opacity doesnt have any affect on Passability. Bunch of ways to fix that.

Share this post


Link to post
Share on other sites
  • 0

that doesnt help, i tried the exact same map without blizz-abs, and it worked perfectly. but its ok, i posted a reply to the official blizz-abs topic explaining my problem. i hope someone can fix this. thanks anyway

Share this post


Link to post
Share on other sites
  • 0

i figured it out :D it was the abs. "LiTTleDRAgo" on chaos project gave me a script fix for it.

Share this post


Link to post
Share on other sites
  • 0

Awesome, congrats! Do you think you could post it here, and add (resolved) to thread name? That way if anyone stumbles across this and has the same problem they can easily have it solved too.

Share this post


Link to post
Share on other sites
  • 0

mmk

but first its important to know exactly what this script does. it makes it so ALL events, are impassable unless the "through" box is checked.

i want it to only do that for events that have graphics, so im still waiting for help on the other forum.

 

 

class Map_Battler < Game_Character
 #----------------------------------------------------------------------------
 # passable?
 #  x - x-coordinate
 #  y - y-coordinate
 #  d - direction
 #  Checks the passability. (pixel movement)
 #----------------------------------------------------------------------------
 def passable?(x, y, d)
# calculate new coordinates
nx = x + (d == 6 ? 1 : d == 4 ? -1 : 0)
ny = y + (d == 2 ? 1 : d == 8 ? -1 : 0)
# impassable if standing on impassable tile
return false unless $game_map.self_passable?(x, y, d, self)
# get pixel movement rate
pix = $BlizzABS.pixel
# if impassable in all directions
unless $game_map.direction_passable?(nx, ny, 10 - d) &&
	$game_map.direction_passable?(nx, ny+pix-1, 10 - d) &&
	$game_map.direction_passable?(nx+pix-1, ny, 10 - d) &&
	$game_map.direction_passable?(nx+pix-1, ny+pix-1, 10 - d)
  # impassable
  return false
end
# new real coordinates
rx, ry = nx * 128 / pix, ny * 128 / pix
# get all events
events = $game_map.events_only
# rectangle
rect = Rect.new(nx, ny, pix, pix)
# if any event in the way
if events.any? {|event|
	!event.through && (event.character_name != '' || event.tile_id >= 0) &&
	$BlizzABS.util.rect_intersection(rect, event.phitbox)}
		#Rect.new(event.x * pix, event.y * pix, pix, pix))}
  # If tiles other than self are consistent with coordinates
  if self == $game_event && event.tile_id >= 0
	# If obstacle bit is set
	if $game_map.passages[event.tile_id] & bit != 0
	  # impassable
	  return false
	# If obstacle bit is set in all directions
	elsif $game_map.passages[event.tile_id] & 0x0f == 0x0f
	  # impassable
	  return false
	# If priorities other than that are 0
	elsif $game_map.priorities[event.tile_id] == 0
	  # passable
	  return true
	end
  else
	# impassable
	return false
  end
end
# if any battler that is not self or an event in the way
if ($game_map.events.values - [self] - events).any? {|battler|
	!battler.through && battler.character_name != '' &&
	$BlizzABS.util.rect_intersection(rect, battler.phitbox)}
		#Rect.new(battler.x, battler.y, pix, pix))}
  # impassable
  return false
end
# passable so far
return true
 end
end

 

 

 

edit: LiTTleDRAgo made a new script that fixes this

 

 

 

class Map_Battler < Game_Character
 #----------------------------------------------------------------------------
 # passable?
 #  x - x-coordinate
 #  y - y-coordinate
 #  d - direction
 #  Checks the passability. (pixel movement)
 #----------------------------------------------------------------------------
 def passable?(x, y, d)
   # calculate new coordinates
   nx = x + (d == 6 ? 1 : d == 4 ? -1 : 0)
   ny = y + (d == 2 ? 1 : d == 8 ? -1 : 0)
   # impassable if standing on impassable tile
   return false unless $game_map.self_passable?(x, y, d, self)
   # get pixel movement rate
   pix = $BlizzABS.pixel
   # if impassable in all directions
   unless $game_map.direction_passable?(nx, ny, 10 - d) &&
    $game_map.direction_passable?(nx, ny+pix-1, 10 - d) &&
    $game_map.direction_passable?(nx+pix-1, ny, 10 - d) &&
    $game_map.direction_passable?(nx+pix-1, ny+pix-1, 10 - d)
  # impassable
  return false
   end
   # new real coordinates
   rx, ry = nx * 128 / pix, ny * 128 / pix
   # get all events
   events = $game_map.events_only
   # rectangle
   rect = Rect.new(nx, ny, pix, pix)
   # Change direction (0,2,4,6,8,10) to obstacle bit (0,1,2,4,8,0)
   bit = (1 << (d / 2 - 1)) & 0x0f
   # if any event in the way
   if events.any? {|event|
    !event.through && (event.character_name != '' ||
    (event.tile_id >= 0 &&
    ($game_map.passages[event.tile_id] & bit != 0 ||
	 $game_map.passages[event.tile_id] & 0x0f == 0x0f))) &&
    $BlizzABS.util.rect_intersection(rect, event.phitbox)}
	    #Rect.new(event.x * pix, event.y * pix, pix, pix))}
  # impassable
  return false
   end
   # if any battler that is not self or an event in the way
   if ($game_map.events.values - [self] - events).any? {|battler|
    !battler.through && battler.character_name != '' &&
    $BlizzABS.util.rect_intersection(rect, battler.phitbox)}
	    #Rect.new(battler.x, battler.y, pix, pix))}
  # impassable
  return false
   end
   # passable so far
   return true
 end
end

 

 

again, this script is made for blizz-abs

Edited by Bob423

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...