![]() |
[SCRIPT] I need help with my Custom Story fast! - 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] I need help with my Custom Story fast! (/thread-19698.html) |
I need help with my Custom Story fast! - Aquatric - 12-27-2012 Hello there, community!
I have been into making Custom Stories and I want to make a really serious and a long one. But I got one problem. I want one key are gonna open a specefic swing door. I've watched tutorials and such, checked the "Locked" box in the Level Editor, but I can't make it work.. So, here's my code: extra.english.lang Spoiler below!
00_castle.hps my HPS file
Spoiler below!
void OnStart()
{ AddUseItemCallback("", "key1", "castle_arched01_1", "UsedKeyOnDoor", true); } void UsedKeyOnDoor(string &in asItem, string &in asEntity) { SetSwingDoorLocked(asEntity, false, true); PlaySoundAtEntity("", "unlock_door", asEntity, 0, false); RemoveItem(asItem); } void OnEnter() { } void OnLeave() { } I'm using Notepad ++, but it won't work. When I am In-Game and picks up the key, it does not say "Handmade Rusty Key" and I can't see the description of it in the inventory. I would love you guys if you could help me, thanks! RE: I need help with my Custom Story fast! - The chaser - 12-27-2012 Hmm... if the description works it must be a general problem: Go to the level editor and click the key. In there, put "key_1" in CustomSubItemName or something like that. If there are .map_cache, delete them. RE: I need help with my Custom Story fast! - Aquatric - 12-27-2012 It did not work, it just says when I pick up the key: "Picked up" then I press tab holding my mouse cursor over the key it's just blank. When I try to unlock the door with the key it says: "Cannot use this item this way!" and how do I see if I have any .map_cache? I only see in my maps folder 00_castle.map and 00_castle.hps RE: I need help with my Custom Story fast! - The chaser - 12-27-2012 (12-27-2012, 01:28 PM)The chaser Wrote: Hmm... if the description works it must be a general problem: RE: I need help with my Custom Story fast! - Aquatric - 12-27-2012 (12-27-2012, 03:04 PM)The chaser Wrote:Hmm..? I just changed it to Key_1 as you said, I had Key1 earlier, both doesn't work, and I cannot find any .map.cache(12-27-2012, 01:28 PM)The chaser Wrote: Hmm... if the description works it must be a general problem: |