Frictional Games Forum (read-only)
Problem with the coding - 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 (https://www.frictionalgames.com/forum/forum-35.html)
+--- Thread: Problem with the coding (/thread-27275.html)



Problem with the coding - UniversalGamerTV - 11-16-2014

So I donĀ“t know how but somehow I screwed up the code, none of the descriptions work that includes: items, doors and the story selection screen

/////////////////////////////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////////////////////////////
This is the coding for the extra_english.lang file:
<LANGUAGE>

<RESOURCES>
</RESOURCES>

<CATEGORY Name="CustomStoryMain">
<Entry Name="Description">Just a brief description!</Entry>
</CATEGORY>

<CATEGORY Name="Inventory">
<Entry Name="ItemName_key_study_1">Storage Room Key</Entry>
<Entry Name="ItemDesc_key_study_1">This seems to be the Storage Room key</Entry>
</CATEGORY>

<CATEGORY Name="LockedDoors">
<Entry Name ="Level_Door_1">This door is locked, It requires a key to open it!</Entry>
<Emtry Name="Level_Door_1_Back">I probably should move on</Entry>
</CATEGORY>

<CATEGORY Name="Levels">
<Entry Name="Level_Door_1">Storage Room</Entry>
<Entry Name="Level_Door_1_Back">Office</Entry>
</CATEGORY>

<CATEGORY Name="Journal">
<Entry Name="Note_note1_Name">School Project Horror Map</Entry>
<Entry Name="Note_note1_Text">Dit project is gemaakt voor onze leerkracht Mr.Kuipers</Entry>
</CATEGORY>

</LANGUAGE>

/////////////////////////////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////////////////////////////
And here is the coding for Level 1:
void OnStart()
{
AddUseItemCallback("", "key_study_1", "Level_Door_1", "OpenDoor", true);
}

void OnEnter()
{

}

void OnLeave()
{

}

void OpenDoor(string &in asItem, string &in asEntity)
{
SetLevelDoorLocked("Level_Door_1", false);
PlaySoundAtEntity("", "unlock_door", "Player", 0, false);
RemoveItem("key_study_1");
}

/////////////////////////////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////////////////////////////
And here is the cfg file coding :
<Main
Name="School Project Horror Map"
Author="Sander, Niels, Rick"
ImgFile="Preview.png"

StartMap="01_school.map"
StartPos="PlayerStartArea_1"
/>

/////////////////////////////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////////////////////////////
so can someone tell me whats wrong?
And why nothing works anymore? Exept starting the story up
I have some pictures of my files layout


RE: Problem with the coding - Mudbill - 11-16-2014

(11-16-2014, 09:16 PM)UniversalGamerTV Wrote: <Emtry Name="Level_Door_1_Back">I probably should move on</Entry>

Typos. Be careful with these things.


RE: Problem with the coding - UniversalGamerTV - 11-18-2014

thanks Mudbill ive seen your vids btw your doing good Big Grin learned a lot keep it up man ! GJ


RE: Problem with the coding - Mudbill - 11-18-2014

Thanks man ^^