Adventure Game Studio

AGS Support => Advanced Technical Forum => Topic started by: Peder 🚀 on Thu 21/08/2003 17:07:42

Title: walk trough locked doors.
Post by: Peder 🚀 on Thu 21/08/2003 17:07:42
I have a problem with my door.. or not actually the door but..
the player can walk trough the door when its supposed to be locked.. because i have to have a walkable area on the door so when the player opens the door with the card he can walk inside and then change room (do you understand what i mean??)  i want it to be like in the game Beneath a steel sky with the elevator...
Title: Re:walk trough locked doors.
Post by: Scummbuddy on Thu 21/08/2003 17:15:54
make 2 seperate walkable areas... they can have the same scaling level... disable the one behind the door, and when it becomes unlocked and when the object/door is open, then enable the walkable area behind the door.
Title: Re:walk trough locked doors.
Post by: Peder 🚀 on Thu 21/08/2003 17:19:25
ok. i thought that would be the answer but since iam not using scripts i dont know how to turn it off.. can you show me what i have to write yust so i know it.. i have tryed to write scripts before but it dosent work.. i dont know what iam doing wrong but the program says it something wrong with the script on line.... and so on..
Title: Re:walk trough locked doors.
Post by: Pumaman on Thu 21/08/2003 18:53:42
To turn one off, write this exactly in the script:

RemoveWalkableArea(1);

(where 1 is the number of the area)

and to bring it back, do:

RestoreWalkableArea(1);
Title: Re:walk trough locked doors.
Post by: Red_Armadillo on Fri 22/08/2003 04:20:46
Another thing you could do would be create a duplicate room but have the door open in the second room so when the character uses the key on the door it took him to the second room.
Title: Re:walk trough locked doors.
Post by: Ishmael on Fri 22/08/2003 05:04:34
I think too tricky and disk space-consuming...