How to temporarly disable part of walkable area?

Started by Gribbler, Thu 02/08/2012 19:21:04

Previous topic - Next topic

Gribbler

Hi all!

I have a long horizontal room, scrolling sideways (640x200), with walkable area from one end to the other. However, there is a door approx. in the middle. What should I do to make player stop in front of the door if its locked, and continue walking when its open? I want the player to unlock the door,  open it, walk past it, and continue further into the scrolling room. I know that it would be much simpler with two separate rooms just connected with the door but it must be this way. How can I do this? Using regions somehow? Any ideas?

Crimson Wizard

Make three walkable areas instead of seamless one: 1st before door, second at the door, third after door.
You may also lower that number to 2 areas, if you are sure door cannot become locked when character is beyond one, but somehow I find 3 little more logical (might depend on how you look at things).

Walkable areas may be enabled and disabled from script by using RemoveWalkableArea() and RestoreWalkableArea() functions.
Check this: http://www.adventuregamestudio.co.uk/wiki/?title=Room_functions#RemoveWalkableArea

Gribbler

Great idea! I didn't know you can enable and disable walkable areas. I searched the manual for their functions and found none... Anyway, thanks! I will try that.

Crimson Wizard

#3
Quote from: Gribbler on Thu 02/08/2012 19:32:55
I searched the manual for their functions and found none...
Hmm... We are having a discussion about improving AGS manual. Probably you may tell what prevented you from finding these? Like you did not guess where to look at, or looked for wrong term?
(I am not joking :) Think of it like it's "gather user experience" program.)
http://www.adventuregamestudio.co.uk/yabb/index.php?topic=46471.msg625264

Gribbler

I simply typed "walkable" in manual search section. There was only info about scaling, lighting, mask importing, moving and walking. Nothing about removing and restoring walkable areas.

BTW I already tried your suggestion and it works perfectly:-)

SMF spam blocked by CleanTalk