(06-27-2013, 08:01 AM)cruisy18 Wrote: All good! I found this tutorial which worked http://www.frictionalgames.com/forum/thread-21024.html
Hey, I have another question but I don't want to start a new thread.
Atm, I have two main_settings.cfg (I rename them so I can switch between them). One is the standard, and one is set up for a development environment, as shown in this wiki page:
http://wiki.frictionalgames.com/hpl2/amn...evenvguide
When I switch to the development main_settings.cfg, it does not pick up on my descriptions or anything in my extra_english.lang file.
Is there a way I can run Amnesia in a development environment and my extra_english.lang file can be read?
Also, another question. I've run into a bit of a problem with coding. Been following a tutorial series on Youtube, and I've copied this bit of code:
void FUNCTION3(string &in entity)
{
if(GetLocalVarInt("DoorLocked") == 1)
{
SetMesssage("Messages", "doorlock2", 3);
}
}
Amnesia crashes when I load the custom story, but if I delete the line:
SetMesssage("Messages", "doorlock2", 3);
it won't crash, but it obviously won't play the message. Anybody care to tell me what I'm doing wrong?
The full code is:
void OnStart()
{
SetLocalVarInt("DoorLocked", 1);
AddUseItemCallback("", "key_tower_1", "level_dungeon_1", "FUNCTION", true);
AddUseItemCallback("", "key_tower_2", "castle_1", "FUNCTION2", true);
SetEntityPlayerInteractCallback("castle_1", "FUNCTION3", false);
}
void OnEnter()
{
}
void OnLeave()
{
}
void FUNCTION(string &in item, string &in door)
{
SetLevelDoorLocked("level_dungeon_1", false);
PlayGuiSound("unlock_door.snt", 100);
RemoveItem(item);
}
void FUNCTION2(string &in item, string &in door)
{
SetSwingDoorLocked("castle_1", false, true);
PlayGuiSound("unlock_door.snt", 100);
RemoveItem(item);
SetLocalVarInt("DoorLocked", 0);
}
void FUNCTION3(string &in entity)
{
if(GetLocalVarInt("DoorLocked") == 1)
{
SetMesssage("Messages", "doorlock2", 3);
}
}