Scripting problem - 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: Scripting problem (/thread-17008.html) |
Scripting problem - Hauken - 07-16-2012 Hello folks! Finally got myself registered, so Im having trouble with the over used Key VS Door script, im in the process of learning the HPL editor scripting functions. I am intrested in learning this, I've been searching this forum, been watching vids over again.. And i cant get whats wrong.. So heres my progress: I can pick up the key, and i can use it to unlock the door specefied, HOWEVER, the key does not have a name, and the door does not have a name either. I suspect it's my HPS file, i've double checked the Lang file dozens of times.. As you can see i've added a note in my map aswell, which shows up blank ingame. LANG FILE TEMPLATE: test1 Awesome note Just a test ey Bedroom Key "Key to bedroomdoor" HPS FILE TEMPLATE //////////////////////////// // Run when entering map void OnStart() { AddUseItemCallback("", "Key_1", "door1", "UsedKeyOnDoor", true); } void UsedKeyOnDoor(string &in asItem, string &in asEntity) { SetSwingDoorLocked("door1", false, true); PlaySoundAtEntity("", "unlock_door.snt", "door1", 0, false); RemoveItem("Key_1"); } I've double checked that the keyname and subname is correct in the editor so I got that covered. I bet most of you see the problem already. EXTRA HELP http://i50.tinypic.com/28wfbq9.jpg RE: Scripting problem - Adny - 07-16-2012 In your entry for "CustomStoryMain" you closed it with /entry instead of /Entry RE: Scripting problem - Hauken - 07-16-2012 Thanks for finding a problem, but it's still the same.. Not solved RE: Scripting problem - Adny - 07-16-2012 I've looked over both the .lang and the .hps more times than I'd like to admit, and can't find anything wrong; the only thing I'd suggest is getting rid of the Resources part in the .lang, you don't really need that. It could be an "external" issue; is the extra_english.lang file located in the same place as your custom_story_settings.cfg? Did you properly "save as..." to save it as a language file, or is it still a text file? That's all I can think of as far as solving it goes. RE: Scripting problem - Hauken - 07-16-2012 (07-16-2012, 06:48 AM)andyrockin123 Wrote: I've looked over both the .lang and the .hps more times than I'd like to admit, and can't find anything wrong; the only thing I'd suggest is getting rid of the Resources part in the .lang, you don't really need that.Yeah, I know it´s wierd.. The lang file is in the same folder as custom story settings file yes. maps custom story file lang file story.png Uhm. I made the lang file with the Lang Editor provided on the frictional games wiki just to be 100% sure its a lang file. extra_english_lang.lang Is how it is.. I´ll look into the resource part when i get home ty. Edit: As I´ve mentioned, the notes turn out blank aswell so it has to be the script right? The note is idiot proof, followed a tutorial on that one so it´s good from the editor at least.. RE: Scripting problem - Your Computer - 07-16-2012 (07-16-2012, 07:33 AM)Hauken Wrote: extra_english_lang.lang It's supposed to be "extra_english.lang" RE: Scripting problem - Hauken - 07-16-2012 Thanks Computer! I had it like you said before but i tried several things to make this work, basically you both helped me! Thankyou both alot it works now! |