Adventure Game Studio

AGS Support => Beginners' Technical Questions => Topic started by: Monsieur OUXX on Tue 12/03/2013 16:30:22

Title: RemoveWalkableArea: does it work before fade-in?
Post by: Monsieur OUXX on Tue 12/03/2013 16:30:22
Hi all,

At the moment I'm working with a room that I didn't design myself.
In the past, some walkable areas were removed and restored in "room_RepExec". I found that silly, so I moved it to "room_Load" (which corresponds to event "on enter room, before fade-in").

But now I notice that the walkable areas are not removed as they should.
However, AFTER fade-in, if the player goes to an object that can also disable the same walkable areas (by triggering the SAME custom function as the one called from room_Load), then the areas get properly removed.

Does function RemoveWalkableArea work before fade-in? Is there a way to display a message on-screen before fade-in, for debugging?
Title: Re: RemoveWalkableArea: does it work before fade-in?
Post by: Slasher on Tue 12/03/2013 17:57:38
Ok to put Walkable area commands (remove / restore) in Room Load if required. They get reset every-time the Room Loads.

You may well need a boolean to check if a condition for a walkable area is true or false during Room Load.

Hope this helps



Title: Re: RemoveWalkableArea: does it work before fade-in?
Post by: Khris on Tue 12/03/2013 18:32:10
Yes; I just tested this and it works just fine in room_Load().
There has to be something wrong with your code logic, or the function isn't linked. Or the area gets turned back on elsewhere.
Title: Re: RemoveWalkableArea: does it work before fade-in?
Post by: Monsieur OUXX on Tue 12/03/2013 22:12:37
Thanks guys.
It's probably some silly mistake in the script but I can't find it. It's one of those über-frustrating bugs ;) Argh.


EDIT: Found it. Obviously it was my script that was incorrect. I was convinced that it WAS handling the fact that the walkable areas were getting reset, but actually it wasn't -- there was some incorrectly-defined boolean condition in the way.