Adventure Game Studio

AGS Support => Beginners' Technical Questions => Topic started by: bx83 on Thu 08/09/2022 07:53:56

Title: Getting walkablearea status only
Post by: bx83 on Thu 08/09/2022 07:53:56
You can easily set a walkable area on or off (restore/remove walkablearea); and you can check to see that the area you're on is walkable area ID <whatever>, but how do you get the *status* of a walkable area?
Eg. if (WalkableAreaStatus(3)==false)  <-- checks if walkable area 3 is not active
Title: Re: Getting walkablearea status only
Post by: Khris on Thu 08/09/2022 08:28:02
There's no function to do that but you can use your own room variable to keep track of the state. Just set it to true/false whenever you restore/remove the walkable area, that way you can check the variable instead.

It's also very possible that GetWalkableAreaAtRoom() will return 0 if the area is turned off.