Jibble

Author Topic: How to temporarly disable part of walkable area?  (Read 1819 times)

Gribbler

  • I'm selling these fine leather jackets.
    • Gribbler worked on one or more games that won an AGS Award!
    •  
    • Gribbler worked on one or more games that was nominated for an AGS Award!
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?

Re: How to temporarly disable part of walkable area?
« Reply #1 on: 02 Aug 2012, 19:28 »
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

  • I'm selling these fine leather jackets.
    • Gribbler worked on one or more games that won an AGS Award!
    •  
    • Gribbler worked on one or more games that was nominated for an AGS Award!
Re: How to temporarly disable part of walkable area?
« Reply #2 on: 02 Aug 2012, 19:32 »
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.

Re: How to temporarly disable part of walkable area?
« Reply #3 on: 02 Aug 2012, 19:41 »
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
« Last Edit: 02 Aug 2012, 20:43 by Crimson Wizard »

Gribbler

  • I'm selling these fine leather jackets.
    • Gribbler worked on one or more games that won an AGS Award!
    •  
    • Gribbler worked on one or more games that was nominated for an AGS Award!
Re: How to temporarly disable part of walkable area?
« Reply #4 on: 02 Aug 2012, 21:11 »
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:-)