Adventure Game Studio

AGS Support => Beginners' Technical Questions => Topic started by: Vincent on Wed 27/11/2024 15:16:01

Title: AGS 4: Remove Walkable Area [Solved]
Post by: Vincent on Wed 27/11/2024 15:16:01
Hello Agser I am using AGS-4.00.00.06-Alpha11 and I was trying to use the functions Remove/Restore WalkableArea but it gives me undefined token. Altough the manual doesn't say this is an obsolate command and I was wondering to know how to do that?
Title: Re: Remove Walkable Area
Post by: MSNBrianC on Wed 27/11/2024 15:39:23
I'm new here but I would suggest posting the snippet of your code. I've gotten that error before if my code was written slightly incorrectly.
Title: Re: Remove Walkable Area
Post by: Crimson Wizard on Wed 27/11/2024 15:47:17
Quote from: Vincent on Wed 27/11/2024 15:16:01Hello Agser I am using AGS-4.00.00.06-Alpha11 and I was trying to use the functions Remove/Restore WalkableArea but it gives me undefined token. Altough the manual doesn't say this is an obsolate command and I was wondering to know how to do that?

We don't have an updated manual for AGS 4.0 yet.
The only documentation of new functions or changes to old functions may be found in change notes in the 4.0 release thread: https://www.adventuregamestudio.co.uk/forums/ags-engine-editor-releases/ags-4-0-early-alpha-for-public-test/

All the walkable area commands are now accessed through "WalkableArea" struct and "walkable[]" global array.

For example, if in AGS 3.* you had:
Code (ags) Select
RemoveWalkableArea(3);
RestoreWalkableArea(3);

In AGS 4.0 you do:
Code (ags) Select
walkarea[3].Enabled = false;
walkarea[3].Enabled = true;



NOTE that you may still enable these original commands back if you select "Script API Version = 3.6.x" in the General Settings.
Title: Re: Remove Walkable Area
Post by: Vincent on Wed 27/11/2024 15:49:06
@Crimson Wizard Thank you very much  :)
Title: Re: Remove Walkable Area
Post by: Crimson Wizard on Wed 27/11/2024 15:50:38
Please, also mention AGS 4 in the topic titles, because this version may be different from AGS 3 in a number of ways, and not many people have a knowledge of it yet.
Title: Re: AGS 4: Remove Walkable Area [Solved]
Post by: Vincent on Thu 28/11/2024 01:56:24
Quote from: Crimson Wizard on Wed 27/11/2024 15:50:38Please, also mention AGS 4 in the topic titles, because this version may be different from AGS 3 in a number of ways, and not many people have a knowledge of it yet.

Thanks all done!  :)