Adventure Game Studio

AGS Support => Beginners' Technical Questions => Topic started by: oskargunn on Thu 02/10/2014 22:58:30

Title: Walkable areas in script
Post by: oskargunn on Thu 02/10/2014 22:58:30
Hi,

Is there a way to detect whether the player is near the edge of a walkable area?

I am trying to create a turn-around animation coupled with the normal walk.
In order to make the animation realistic I need to move the character a few pixels in the direction of the mouse click, but this can cause the character to be moved outside of the walkable area.
Title: Re: Walkable areas in script
Post by: oskargunn on Thu 02/10/2014 23:01:47
I thought I had exhausted the forum with my search, but now I seem to have found  GetWalkableAreaAt.
This might work if I test for which walkable area is at xy with offset :)
Title: Re: Walkable areas in script
Post by: Adeel on Fri 03/10/2014 13:57:41
Another option would be to use regions. You can create one near the edge of that walkable area of yours. That's easier, imho.