Frictional Games Forum (read-only)
[SCRIPT] Need help with some basic scripting - Printable Version

+- Frictional Games Forum (read-only) (https://www.frictionalgames.com/forum)
+-- Forum: Amnesia: The Dark Descent (https://www.frictionalgames.com/forum/forum-6.html)
+--- Forum: Custom Stories, TCs & Mods - Development (https://www.frictionalgames.com/forum/forum-38.html)
+---- Forum: Development Support (https://www.frictionalgames.com/forum/forum-39.html)
+---- Thread: [SCRIPT] Need help with some basic scripting (/thread-11981.html)



Need help with some basic scripting - SpudroSpadre - 12-21-2011

Let's say I have a door "mansion_1" and it's locked.
So I want it to say "Door to upstairs is locked" when a player tries to open it.





What exactly I need to do ?


Please help
Blush


RE: Need help with some basic scripting - Your Computer - 12-21-2011

http://www.youtube.com/watch?v=mEpIqXo7MAc&list=PLD326789BC99530C8&index=8
http://www.youtube.com/watch?v=2BNFw7PR6d4&list=PLD326789BC99530C8&index=11


RE: Need help with some basic scripting - SpudroSpadre - 12-21-2011

(12-21-2011, 01:21 AM)Your Computer Wrote: http://www.youtube.com/watch?v=mEpIqXo7MAc&list=PLD326789BC99530C8&index=8
http://www.youtube.com/watch?v=2BNFw7PR6d4&list=PLD326789BC99530C8&index=11
How can I do that with normal swing doors ?


RE: Need help with some basic scripting - Your Computer - 12-21-2011

(12-21-2011, 01:39 AM)SpudroSpadre Wrote: How can I do that with normal swing doors ?

http://wiki.frictionalgames.com/hpl2/amnesia/script_functions

You set a callback on the door with SetEntityPlayerInteractCallback, and in the callback you check if the door is locked with GetSwingDoorLocked. If it is, display a message with SetMessage.