(03-21-2013, 06:04 PM)Your Computer Wrote: Your XML has syntax errors in it. For starters, the RESOURCES element wasn't opened to begin with, so there's no need to have a closing tag for it. Also, XML doesn't support C-like comments. If you want to write comments, you have to do it like this:
<!-- Comment goes here -->
Ohhhhhhhh that makes more sense. I'll give it a try
Thanks (to both of you)
Edit: still doesn't work :\ Not sure why
.Lang File:
<LANGUAGE>
<CATEGORY Name="CustomStoryMain">
<Entry Name="Description">There are multiple endings based on your actions. Good luck.</Entry>
</CATEGORY>
<CATEGORY Name="Inventory">
<Entry Name="ItemName_ScienceKey">Room Key</Entry>
<Entry Name="ItemDesc_ScienceKey">A simple key. Probably for that locked room down the hallway...</Entry>
</CATEGORY>
<CATEGORY Name="Journal">
</CATEGORY>
<CATEGORY Name="Levels">
<Entry Name="LivingQuarters">Living Quarters</Entry>
<Entry Name="Atrium">Atrium</Entry>
</CATEGORY>
<CATEGORY Name="Messages">
<Entry Name="FirstHint">When was that candle in the corner lit?</Entry>
<Entry Name="SecondHint">That chemical jar... something must have made it fall, but what?</Entry>
</CATEGORY>
<CATEGORY Name="Hints">
</CATEGORY>
<CATEGORY Name="EmotionStone">
</CATEGORY>
<CATEGORY Name="LoadingText">
</CATEGORY>
<CATEGORY Name="Ending">
<Entry Name="MainCredits"></Entry>
</CATEGORY>
</LANGUAGE>
Script:
void OnEnter()
{
/////////Setting up the level//////////
AddUseItemCallback("ScienceRoom", "science_key", "locked_door", "Unlockdoor", true);
AddTimer("painting", 3.0f, "timer_painting");
PlayMusic("10_amb", true, 1.0f, 3.0f, 1, true);
///////Monster Encounters/////////
AddEntityCollideCallback("book_moveable_1", "AreaBookPulled_1", "Secret_Shelf", true, 1);
AddEntityCollideCallback("Player", "AreaMonsterTrigger", "MonsterTrigger", true, 1);
///////In case the player gets stuck////////
AddEntityCollideCallback("Player", "AreaHint_1", "Hint_1", true, 1);
AddEntityCollideCallback("Player", "AreaHint_2", "Hint_2", true, 1);
}
void Hint_1(string &in asParent, string &in asChild, int alState)
{
AddTimer("First_Hint", 120.0f, "timer_hint_1");
}
void Hint_2(string &in asParent, string &in asChild, int alState)
{
AddTimer("Second_Hint", 180.0f, "timer_hint_2");
}
void timer_hint_1(string &in asTimer)
{
SetMessage("Messages", "FirstHint", 0);
}
void timer_hint_2(string &in asTimer)
{
SetMessage("Messages", "SecondHint", 0);
}