Adventure Game Studio

AGS Support => Advanced Technical Forum => Topic started by: AndersM on Thu 11/03/2004 08:23:09

Title: Walking on non-walkable
Post by: AndersM on Thu 11/03/2004 08:23:09
My character walks wherever he wants. I have a at least 4-5
pixel whide area that is not-walkable,(Not filled with any
walkable-area-colour) but the character just walks across it.
It looks strange since there is a table in that area, and he just
walks right trough it.

Hov do I stop him from doing this? I can't make the
not-walkable-area whider, 'cos the room is not that whide...
Title: Re:Walking on non-walkable
Post by: Gilbert on Thu 11/03/2004 09:26:27
That's strange, are you sure the character walk through the non-walkable areas (classic notation: walls) directly or he just move afound it?

Judging from your description we cant draw much conclusion on the problem, since we don't know by "moving" the character what you're using.

So, check also that the moves weren't done by using "MoveCharacterDirect()" which will ignore the "walls" and make him walks through them.
Title: Re:Walking on non-walkable
Post by: AndersM on Thu 11/03/2004 09:49:00
Update with explanations: There are a table in a room that stands like a counter out from the wall (there are walkable areas on tree sides of it) The player character starts behind the table, and when you click with the walk-to cursor on the area infront of the table, sometimes he walks around the table, and sometimes he walks right trough the table. I've checked the walkable areas 3 times and made the 'non-walkable-area' between the one behind the table and the one infront of the table whider each time, but 50% of the times I click he still walks trough the table... *confused*
Title: Re:Walking on non-walkable
Post by: Gilbert on Thu 11/03/2004 09:55:43
In that case, check your character's walking speed, it actually (sorta) determines the pixel increment he'll walk each game loop, if it's set too high, chances are, you need thicker "walls" to prevent him from squeezing through it.

Also, check that if there are "diagonal gaps" in the "walls", like:

OX
XO

In above X is "wall" O is walkable, the character may be able to squeeze thru from the top-left O to the bottom right O and vice versa.
Title: Re:Walking on non-walkable
Post by: Robert Eric on Thu 11/03/2004 11:04:03
What is your character's X and Y walking speeds?
Title: Re:Walking on non-walkable
Post by: AndersM on Thu 11/03/2004 21:08:04
Here is the room and the walkable area. If the player character stands in the position behind the table, and you click with the 'walk-to cursor on the walkable area infront of the table, he just walks right trough the table

(http://www.2dadventure.com/ags/tablewalk.gif)

Movement speed is  3
Animation speed is 5

Title: Re:Walking on non-walkable
Post by: Pumaman on Thu 11/03/2004 21:19:06
I think the real problem isn't the size of the gap, but rather the height of the actual walkable areas. Try making them at least 3-4 pixels high each, with at least a 4 pixel non-walkable area in between.
Title: Re:Walking on non-walkable
Post by: AndersM on Thu 11/03/2004 22:12:45
The room does not have room for that...
Title: Re:Walking on non-walkable
Post by: Darth Mandarb on Fri 12/03/2004 01:38:59
Just a suggestion:

I would make the tables as objects.

Then make the (left-to-right) walkable areas 1 pixel wider each.
(Add one row to the top and one row to the bottom)

I found that sometimes not changing the space between walkable areas, but just increasing their over-all size, does the trick.

I don't know why, but it worked for me.

Or maybe just removing the inner row of pixels from the bottom walkable area and adding another row to the bottom of it might work too.

Man I hope this makes sense ...

Good luck!

~ d