Closet script need help !!! :) - 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: Closet script need help !!! :) (/thread-17647.html) Pages:
1
2
|
Closet script need help !!! :) - Pandachoko - 08-10-2012 I am fully working on my custom story but now I am stuck in one of my script(Key to closet) and this is my script: //////////////////////////// // Run first time starting map void OnStart() { AddUseItemCallback("", "KeyCloset", "ClosetLock", "UnlockCloset", true); } void UnlockCloset(string &in asItem, string &in asEntity) { SetEntityActive("ClosetLock", false); GiveSanityBoost(); PlaySoundAtEntity("", "unlock_door", "Player", 0, false); RemoveItem("KeyCloset"); } //////////////////////////// // Run when entering map void OnEnter() { } //////////////////////////// // Run when leaving map void OnLeave() { } This is my lang file: <CATEGORY Name="Inventory"> <Entry Name="ItemDesc_KeyCloset">This is a hidden key for a closet in the basement </Entry> <Entry Name="ItemName_KeyCloset">Double spare key</Entry> </CATEGORY> My key name is: Keycloset And my blockbox is named: ClosetLock Can you see what I am during wrong!! PLease help RE: Closet script need help !!! :) - Lizard - 08-10-2012 My key name is: Keycloset Your name of the key has a small c "c" and in your .hps and .lang file you are writting it with a capital c "C" RE: Closet script need help !!! :) - Adny - 08-10-2012 Can you please specify what you're trying to accomplish with your script? I'm not quite sure I follow what you're trying to do with a key and a block box. Also, why did you post your lang? RE: Closet script need help !!! :) - Pandachoko - 08-10-2012 the lang I don't know, and all this. I made this because. When you pick up this secret key(not in the storyline, just free roam) you can open a closet to pick up a key that will lead to a huge secret area(libary) and there you will able to pick up alot of stuff RE: Closet script need help !!! :) - Kazakarumariou - 08-10-2012 (08-10-2012, 04:55 PM)andyrockin123 Wrote: Can you please specify what you're trying to accomplish with your script? I'm not quite sure I follow what you're trying to do with a key and a block box. Also, why did you post your lang?There's a block box covering the front of the closet. when you use the key on the block box it rids of itself RE: Closet script need help !!! :) - Adny - 08-10-2012 Why not just lock it ._. RE: Closet script need help !!! :) - Pandachoko - 08-10-2012 because you can't use the door function on it(if it is that you mention) RE: Closet script need help !!! :) - Adny - 08-10-2012 You can use setswingdoorlocked on cabinets 0.o I am 100% at least one of the cabinet types allows it (but I'm 90% the rest of them are compatible with the function as well). The options under the entity tab of each cabinet is exactly the same as a swing door; I can confirm that mansion set cabinet does in fact work in game. RE: Closet script need help !!! :) - Kazakarumariou - 08-10-2012 (08-10-2012, 08:35 PM)andyrockin123 Wrote: You can use setswingdoorlocked on cabinets 0.oyou serious? ive been doing it a more complicated way this entire time. xD RE: Closet script need help !!! :) - Pandachoko - 08-10-2012 Can you make me an script function?! to it |