Adding messages to a locked door? - 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: Adding messages to a locked door? (/thread-16476.html) |
Adding messages to a locked door? - Jagsrs28 - 06-25-2012 Well I followed the instructions for adding messages to a locked door and it's just not working. What I did: Added: <CATEGORY Name=“Messages”> <Entry Name =“msgname1”>The door seems to be locked. Maybe I should look around a little bit.</Entry> </CATEGORY> To my .lang file Also added: void DoorLockedPlayer1(string &in entity) { if(GetSwingDoorLocked("castle_1") == true) { SetMessage("Messages", "msgname1", 0); } } To my .hps file I clicked on my door in hpl2 and went to the Entity's tab (The door was already locked) and typed in DoorLockedPlayer1 for the player interact call back. I am thinking it is a scripting error. Please help me? RE: Adding messages to a locked door? - Demondays1 - 06-25-2012 Instead of getswingdoorlocked, try this: SetSwingDoorLocked("castle_1", false, true); and take off the extra } at the end. Im no expert at scripting but I am trying to help. RE: Adding messages to a locked door? - Jagsrs28 - 06-25-2012 (06-25-2012, 06:46 AM)Demondays1 Wrote: Instead of getswingdoorlocked, try this:Crashed... RE: Adding messages to a locked door? - Demondays1 - 06-25-2012 (06-25-2012, 06:50 AM)Jagsrs28 Wrote:Ok add your original back and see what happens if you take off "if" also leave the } at the end deleted so you only have 1.(06-25-2012, 06:46 AM)Demondays1 Wrote: Instead of getswingdoorlocked, try this:Crashed... RE: Adding messages to a locked door? - Your Computer - 06-25-2012 If those special quotation marks were used in the LANG file, then that's one explanation why the message didn't work. RE: Adding messages to a locked door? - Damascus - 06-25-2012 Instead of: if(GetSwingDoorLocked("castle_1") == true) Use: if(GetSwingDoorLocked("castle_1")) It comes back as "true," and that's what triggers the if statement. Operations like == are only used for numbers. |