Frictional Games Forum (read-only)
[SCRIPT] Script not working and keys and notes appear as blank - 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] Script not working and keys and notes appear as blank (/thread-44418.html)



Script not working and keys and notes appear as blank - JohnS0N - 04-17-2016

For no reason whatsoever, my custom story's 3rd map completely fails to function, it does not play custom music, only identifies one key and spawns a monster from a script. the other key in a library area says Picked up when its taken into inventory!
The script of the map:

void OnStart()
{
SetEntityPlayerInteractCallback("librarykey", "ActivateMonster", true);
AddUseItemCallback("", "librarykey", "eastwing1", "UseKeyOnDoor", true);
AddEntityCollideCallback("Player", "Doorscript", "Doorclose", true, 1);
}

void UseKeyOnDoor(string &in asItem, string &in asEntity)
{
SetSwingDoorLocked(asEntity, false, true);
PlaySoundAtEntity("", "unlock_door.snt", asEntity, 0, false);
RemoveItem(asItem);
}

void ActivateMonster(string &in item)
{
SetEntityActive("grunt2", true);
AddEnemyPatrolNode("grunt2", "Path1", 0, "Idle");
AddEnemyPatrolNode("grunt2", "Path2", 0, "Idle");
AddEnemyPatrolNode("grunt2", "Path3", 0, "Idle");
AddEnemyPatrolNode("grunt2", "Path4", 0, "Idle");
AddEnemyPatrolNode("grunt2", "Path5", 0, "Idle");
AddEnemyPatrolNode("grunt2", "Path6", 0, "Idle");
AddEnemyPatrolNode("grunt2", "Path7", 0, "Idle");
AddEnemyPatrolNode("grunt2", "Path8", 0, "Idle");
}

void Doorclose(string &in asParent, string &in asChild, int alState)
{
AddPropForce("Maintenance", 2000, 0, 0, "world");
}




void OnEnter()
{
PlayMusic("Leveleast1.ogg", true, 1, 2, 1, true);
}

void OnLeave()
{

}


the extra_english file:

<LANGUAGE>
<CATEGORY Name="CustomStoryMain">
<Entry Name="Description">Prepare yourself for one of the scariest of Amnesia Custom stories yet![br][br]The Manor's Secret tells the dark and mysterious story of the manor, that burned down under mysterious circumstances in 1895[br][br]When you're ready just click the Start Game Button and enjoy the experience!</Entry>
</CATEGORY>

<CATEGORY Name="Inventory">
<Entry Name="ItemName_Doorkey1">The Door Key</Entry>
<Entry Name="ItemDesc_Doorkey1">This key unlocks the door of my bedroom.</Entry>
<Entry Name="ItemName_east">East Wing Key</Entry>
<Entry Name="ItemDesc_east">Opens the door to the East Wing, located on the other side of the staircase.</Entry>
<Entry Name="ItemName_librarykey">Library Key</Entry>
<Entry Name="ItemDesc_librarykey">The Key to the library.</Entry>
<Entry Name="ItemName_cellarae">Cellar Key</Entry>
<Entry Name="ItemDesc_cellarae">This Key opens the door to the Cellar.</Entry>
</CATEGORY>
<CATEGORY Name="Journal">
<Entry Name="Note_wahren_Name">The Manor Log: Strange sounds.</Entry>
<Entry Name="Note_wahren_Text">Recently We have started hearing strange sounds in the Basement.[br] I've sent my servants down there to investigate,[br] but nothing out of the ordinary has been found.[br] The sounds become more and more terrifying day by day...[br]Mr.Wahren</Entry>
<Entry Name="Note_Caroline_Name">20th of September, 1895</Entry>
<Entry Name="Note_Caroline_Text">...My second year Working as a servant for Mr. Wahren has been relaxing as a change from the hassle of the city[br] I find Mr. Wahren a very nice man for letting me have this luxurious personal space[br] Though these last few weeks have been strange, The noises from the basment we investigated a few days ago have become worse, and that's not all...[br] We have also started to hear footsteps all around the bedroom corridors, which led to us all locking the doors of our personal quarters for the night.[br] we saw footsteps coming from the east wing, which led us to lock it so who, or whatever is in there to lurk on us...</Entry>
<Entry Name="Note_Mark_Name">The Basement Key</Entry>
<Entry Name="Note_Mark_Text">We've hidden the Key to the basement into the East Wing[br]It's wiser to keep the door locked[br]than to let whatever's in there to creep up to us at night and... [br]wait, what are those footsteps, I hear?</Entry>
<Entry Name="Note_easter1_Name">Congratulations!</Entry>
<Entry Name="Note_easter1_Text">[voice easter1.ogg][br] You've Found Easter Egg note Number 1![br]Find all of the notes and find the hidden treasure![br]Hint: The second note kisses the moonlight.</Entry>
<Entry Name="Note_EasterEgg2_Name">Well well...</Entry>
<Entry Name="Note_EasterEgg2_Text">[voice easter2.ogg][br] You've found the second Easter egg note![br] Now, The third and final note, along with the treasure, is within the darkness, you will descend to...</Entry>
<Entry Name="Note_EasterEgg3_Name">Hooray!</Entry>
<Entry Name="Note_EasterEgg3_Text">[voice easter3.ogg][br] Well well well, you have found the treasure, here is also a shrine to the legends who inspired me to do this...</Entry>
<Entry Name="Note_Caution_1_Name">Caution!</Entry>
<Entry Name="Note_Caution_1_Text">The key to the cellar has been hidden into the library, and the library has been locked due to unsettling events being witnessed there. [br]The key is encased in a glass display for everyone's safety, TAKE THE KEY AT YOUR OWN RISK!</Entry>
</CATEGORY>
<CATEGORY Name="Messages">
<Entry Name="Message">This isn't the large oil canister I usually have in here... Where is it?</Entry>
<Entry Name="Message_2">There it is, I knew I shouldn't have let my nephews come and play in my bedroom.</Entry>
</CATEGORY>
</LANGUAGE>



30.7.2016 and NO ONE has contibuted to this problem? over 300 have seen this, and yet no help...