![]() |
[LANG] Need help displaying door is locked on non-exit doors. - 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: [LANG] Need help displaying door is locked on non-exit doors. (/thread-13272.html) Pages:
1
2
|
Need help displaying door is locked on non-exit doors. - julianprokop - 02-12-2012 How do you make a custom message appear when I interact with door entities that aren't exit doors? The Exit doors have options for .lang files but there must be a way to create a object orientated category in the .lang file for any entity. Any ideas on how I could do so? The tutorials I've found aren't answering what I need. RE: Need help displaying door is locked on non-exit doors. - Linus Ă…gren - 02-12-2012 You need to make an interact callback PHP Code: SetEntityPlayerInteractCallback(string& asName, string& asCallback, bool abRemoveOnInteraction); PHP Code: SetMessage(string& asTextCategory, string& asTextEntry, float afTime); Example: Quote:void OnStart() RE: Need help displaying door is locked on non-exit doors. - flamez3 - 02-12-2012 I did that once, problem is that you still have it after you unlock it :/ RE: Need help displaying door is locked on non-exit doors. - SilentStriker - 02-12-2012 To have it not show text when it's unlocked you need to use local variables RE: Need help displaying door is locked on non-exit doors. - Juby - 02-12-2012 In the callback use: Code: if(GetSwingDoorLocked("Door")==false) SetMessage("TxtCat", "TxtEnt", 3); if you want to not have the message appear after the door is unlocked. RE: Need help displaying door is locked on non-exit doors. - julianprokop - 02-12-2012 ill try that out could you give me an example of how I would include that in my call back? My project is getting pretty huge with lots of code going on so and {} brackets are usually the death of me. RE: Need help displaying door is locked on non-exit doors. - julianprokop - 02-12-2012 could you give me an example of how I would include that in my call back? My project is getting pretty huge with lots of code going on so and {} brackets are usually the death of me. RE: Need help displaying door is locked on non-exit doors. - Juby - 02-13-2012 Do exactly as junkfood2121 said, but replace the SetMessage("Messages", "DoorLocked", 3.0f); with the command I said. RE: Need help displaying door is locked on non-exit doors. - julianprokop - 02-13-2012 Still isn't working. This is what I have, ///CALLBACK { SetEntityPlayerInteractCallback("locked_door", "door_message", true); } ///FUNCTION void door_message(string &in asEntity) { if(GetSwingDoorLocked("Door")==false) { SetMessage("Doors", "door", 3); } } RE: Need help displaying door is locked on non-exit doors. - flamez3 - 02-13-2012 Can we see your .lang file and have you named everything exactly? |