Adventure Game Studio

AGS Support => Advanced Technical Forum => Topic started by: am on Sat 03/05/2003 23:01:39

Title: Question/Suggestion - Disable walk-to
Post by: am on Sat 03/05/2003 23:01:39
I have my character become "unable to move" at certain points in the game, this is done by disabeling the walk curser (and also the use curser), however, when there is a walk-to point in the room and the character is talking to that area it still moves.

Is there a way to prevent the character from moving (this does not happen at a specific place, but may happen anywhere in the game)?

If not the I suggest adding DisableWalk-to and EnableWalk-to script commands
Title: Re:Question/Suggestion - Disable walk-to
Post by: Andail on Sun 04/05/2003 00:08:09
Maybe it's not a very smooth way, but you could disable the walkable areas, and the character wouldn't be able to move at all

You could also program it using global int, that prevented your mous clicks to be carried out
Title: Re:Question/Suggestion - Disable walk-to
Post by: am on Sun 04/05/2003 04:43:18
Preventing the clicks from working isn't good because I need them to work, only not to walk.

Is there a way to know (in the script) how many walkable areas are there? As I said this can happen anywhere in the game
Title: Re:Question/Suggestion - Disable walk-to
Post by: Pumaman on Sun 04/05/2003 19:20:03
Interesting point.

To workaround it for now, just disable all 14 walkable areas - if one doesn't exist on the current screen, it just won't do anything.
Title: Re:Question/Suggestion - Disable walk-to
Post by: Spyros on Sun 04/05/2003 21:19:38
To make it easy make this global function
function RemoveAllWalkable(){
int area=1;
while area<15 {
RemoveWalkableArea(area);
area++;
}

}

and import it in the room header