Frictional Games Forum (read-only)
[SCRIPT] Key - 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] Key (/thread-13020.html)

Pages: 1 2


Key - Saren - 02-01-2012

When I try to launch my story it says Masterbedroomkey was not declared... or something like that.... anything wrong here?
// Run when entering map
void OnEnter()
{
AddUseItemCallback("", "Masterbedroomkey", "masterbedroomdoor", "UsedKeyOnDoor", true);
}

void UsedKeyOnDoor(string &in asItem, string &in asEntity)
{
SetSwingDoorLocked("masterbedroomdoor", false, true);
PlaySoundAtEntity("", "unlock_door", "masterbedroomdoor", 0, false);
RemoveItem(Masterbedroomkey);
}

////////////////////////////
// Run when leaving map
void OnLeave()
{

}



RE: Key - SilentStriker - 02-01-2012

Check if you have named your key Masterbedroomkey Smile



RE: Key - Saren - 02-01-2012

(02-01-2012, 04:32 PM)SilentStriker Wrote: Check if you have named your key Masterbedroomkey Smile
Indeed I have =)




RE: Key - SilentStriker - 02-01-2012

I don't know if it's needed but have you made a entry for the key in the .lang file? Smile

Nvm I found the problem, You forgot "" on RemoveItem Wink



RE: Key - Saren - 02-01-2012

Hmm.... that might be the problem.. lol, I don't think it's NESSERCARY either but... let's give it a go xD



RE: Key - SilentStriker - 02-01-2012

(02-01-2012, 04:42 PM)Saren Wrote: Hmm.... that might be the problem.. lol, I don't think it's NESSERCARY either but... let's give it a go xD
it should look like this RemoveItem("Masterbedroomkey");




RE: Key - flamez3 - 02-01-2012

(02-01-2012, 04:42 PM)Saren Wrote: I don't think it's NESSERCARY
It is necessary.





RE: Key - Saren - 02-01-2012

Still nothing =(

(02-01-2012, 04:53 PM)flamez3 Wrote:
(02-01-2012, 04:42 PM)Saren Wrote: I don't think it's NESSERCARY
It is necessary.
Sooo, you got an idea what's wrong?





RE: Key - Your Computer - 02-01-2012

(02-01-2012, 05:00 PM)Saren Wrote: Sooo, you got an idea what's wrong?

Read post #6.


RE: Key - Saren - 02-01-2012

(02-01-2012, 07:32 PM)Your Computer Wrote: Read post #6.
Right....
Great... now it said something about a ; .... Maybe missing, 1 too much.. I dunno...