![]() |
Locked Door Message not Working, Help Needed. (Awarding Virtual Cookie) - 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: Locked Door Message not Working, Help Needed. (Awarding Virtual Cookie) (/thread-18119.html) |
RE: Problem with "extra_english.lang" - Zaffre - 09-03-2012 Okay. This is how your .hps file should look. We'll presume your door's ID is mansion_1. void OnStart() { SetEntityPlayerInteractCallback("mansion_1", "DoorLockedMessage", true); } void DoorLockedMessage(string &in entity) { SetMessage("Messages", "lockeddoor", 0); } This makes it so that when you interact with the swing door, it will display a message stating that the door is locked. The message will not be displayed again. RE: Problem with "extra_english.lang" - Frodos - 09-03-2012 Sigh, I've tried all your advice and more and it still doesn't work! I'm so disappointed with myself, I feel like I'm letting you all down. I think we'll try one more time and if it doesn't work that's okay, you all have done enough already. I'm going to give you all the info, hopefully someone will find the problem. Name of Door: roomone Active: Yes CastShadows:Yes StaticPhysics:No IsAffectedbyDecal:No PlayerInteractCallback: DoorLockedPlayer PlayerInteractCallBackAutoRemove: Yes Locked: Yes OpenAmount: 0 extra_english.lang: <LANGUAGE> <CATEGORY Name="Messages"> <Entry Name="lockeddoor">The door is locked from the outside, maybe there is another way out of here.</Entry> </CATEGORY> </LANGUAGE> hps file: void OnStart() { SetEntityPlayerInteractCallback("roomone", "DoorLockedPlayer", true); } void DoorLockedMessage(string &in entity) { SetMessage("Messages", "lockeddoor", 0); } note: There is one other thing in english_Lang, a code for a note message, which works fine. There is nothing else in hps other than the door code. RE: Problem with "extra_english.lang" - Zaffre - 09-03-2012 I can't find anything; it should be working fine. Sorry I couldn't help you. RE: Problem with "extra_english.lang" - Frodos - 09-03-2012 That's okay, thanks. If anyone knows the reason this hasn't been working please help. RE: Problem with "extra_english.lang" - FlawlessHappiness - 09-04-2012 (09-03-2012, 11:05 PM)Frodos Wrote: void OnStart()How about the bold words? ![]() Do i get cookie? ![]() RE: Locked Door Message not Working, Help Needed. (Awarding Virtual Cookie) - Frodos - 09-04-2012 It didn't work Beecake, sorry, you'll still get a cookie though. Still looking for an answer. RE: Locked Door Message not Working, Help Needed. (Awarding Virtual Cookie) - Kazakarumariou - 09-04-2012 void OnStart(); { SetEntityCallbackFunc("roomone", "DoorLockedMessage"); } void DoorLockedMessage(string &in asItem, string &in asEntity) { SetMessage("Messages", "lockeddoor", 0); } ------------ Try dat RE: Locked Door Message not Working, Help Needed. (Awarding Virtual Cookie) - Frodos - 09-05-2012 (09-04-2012, 11:41 PM)Harthex Wrote: void OnStart();Okay I tried that and got a fatal error. FATAL ERROR: Could not load script file 'custom stories/Nightmare of a Child/maps/ch01/childnightmare.hps'! main (2,1) : ERR : Unexpected token '{' RE: Locked Door Message not Working, Help Needed. (Awarding Virtual Cookie) - Statyk - 09-05-2012 Here's the whole setup: Name of Door: roomone Active: Yes CastShadows:Yes StaticPhysics:No IsAffectedbyDecal:No PlayerInteractCallback: DoorLockedMessage PlayerInteractCallBackAutoRemove: Yes Locked: Yes OpenAmount: 0 extra_english.lang <LANGUAGE> <CATEGORY Name="Messages"> <Entry Name="lockeddoor">The door is locked from the outside, maybe there is another way out of here.</Entry> </CATEGORY> </LANGUAGE> HPS: void OnStart() { //NOTHING. The callback is already set on the door in the level editor } void DoorLockedMessage(string &in asEntity) { SetMessage("Messages", "lockeddoor", 0); } RE: Locked Door Message not Working, Help Needed. (Awarding Virtual Cookie) - Kazakarumariou - 09-05-2012 (09-05-2012, 12:15 AM)Frodos Wrote:void OnStart()(09-04-2012, 11:41 PM)Harthex Wrote: void OnStart();Okay I tried that and got a fatal error. Oops I added ; at the end of onstartlol |