12-27-2010, 05:33 PM
Hey I have a problem with my Item descriptions and my note.
I first had a note and 1 key and that worked excellent now I added another key and now nothing works anymore.
I have this code:
and my .lang file:
I hope someone can help me :p
I first had a note and 1 key and that worked excellent now I added another key and now nothing works anymore.
I have this code:
Code:
void OnStart(){
int GiveLanternOnStart = 1; // Set to 1 to receive a Lantern on start of game
int TinderboxStartAmount = 5; // Amount of Tinderboxes you receive on start of game
// SetPlayerSanity(100.0f);
SetPlayerLampOil(0.0f);
SetNumberOfQuestsInMap(2);
AddQuest("Explore","Explore");
PlayMusic("06_amb.ogg", true, 1, 3, 0, true);
for(int i = 1; i != 147; i++){
AddEnemyPatrolNode("waterlurker_1","PathNodeArea_" + i,0,"");
}
}
//if(ScriptDebugOn()){
// GiveItemFromFile("lantern","lantern.ent");
//
// SetPlayerLampOil(100.0f);
//
// for(int i = 0; i != TinderboxStartAmount; i++){
// GiveItemFromFile("tinderbox_"+i,"tinderbox.ent");
// }
//}
void OnEnter(){
AddUseItemCallback("","FirstCellDoorKey","FirstCellDoor","KeyOnBedRoomDoor1",true);
AddUseItemCallback("","LockedSewerDoorKey","LockedSewerDoor1","KeyOnSewerDoor1",true);
AddEntityCollideCallback("Player","ScriptAreaCloseBedRoomDoor1","CloseDoorBedRoom1",true,1);
AddEntityCollideCallback("Player","ScriptAreaFirstCellRoom1SecretPassage","CellRoom1SecretPassage",false,1);
// AddEntityCollideCallback("Player","ScriptAreaActivateWaterLurker","ActivateWaterLurker",true,1);
SetEntityPlayerInteractCallback("FirstLockedDoor","FirstLockedDoorScare",true);
SetEntityPlayerInteractCallback("FirstCellDoor","FirstLockedCellDoor",true);
SetEntityPlayerInteractCallback("CellarDoor1","CellarRoom1Scare",true);
SetEntityPlayerLookAtCallback("BedRoom1Door","BedRoom1ScareDoor",false);
}
void OnLeave(){
}
void FirstLockedDoorScare(string &in asEntity){
PlaySoundAtEntity("","break_wood_metal",asEntity,0,false);
GiveSanityDamage(5.0f,true);
PlayMusic("react_breath2",false,100.0f,0.0f,1,false);
// StartScreenShake(0.1f,1.0f,0.0f,0.75f);
}
void FirstLockedCellDoor(string &in asEntity){
AddQuest("CellIsLocked","CellIsLocked");
}
void KeyOnBedRoomDoor1(string &in asItem, string &in asEntity)
{
SetSwingDoorLocked("FirstCellDoor",false,true);
PlaySoundAtEntity("","unlock_door","FirstCellDoor",0.0f,false);
RemoveItem("FirstCellDoorKey");
GiveSanityBoost();
PlayMusic("02_puzzle",false,100.0f,0.0f,1,false);
AddDebugMessage("The Door has successfully opened. Congratulations!", false);
}
void CloseDoorBedRoom1(string &in asParent,string &in asChild,int alState){
SetSwingDoorClosed("BedRoom1Door",true,true);
PlayMusic("react_breath1",false,100.0f,0.0f,1,false);
GiveSanityDamage(5.0f,true);
AddTimer("BedRoom1ScareDoorTimer",2.0f,"LookAtBedRoom1Door");
StartPlayerLookAt("BedRoom1Door",10.0f,50.0f,"BedRoom1ScareDoor");
}
void LookAtBedRoom1Door(string &in asTimer){
RemoveTimer("BedRoom1ScareDoorTimer");
StopPlayerLookAt();
}
void CellRoom1SecretPassage(string &in asParent,string &in asChild,int alState){
PlayMusic("01_puzzle_passage",false,100.0f,0.0f,1,false);
GiveSanityBoost();
AutoSave();
SetEntityActive("waterlurker_1",true);
CheckPoint("CheckPoint1","PlayerStartArea_2","CellRoomCheckPoint","Hints","");
}
void CellRoomCheckpoint(string &in asName, int alCount){
SetEntityActive("waterlurker_1",true);
CheckPoint("CheckPoint1","PlayerStartArea_2","CellRoomCheckPoint","Hints","");
}
void CellarRoom1Scare(string &in asEntity){
PlaySoundAtEntity("","notice","WoodenBoxScare1",0.0f,false);
GiveSanityDamage(5.0f,true);
}
void KeyOnSewerDoor1(string &in asItem, string &in asEntity){
// SetSwingDoorLocked("FirstCellDoor",false,true);
PlaySoundAtEntity("","unlock_door","LockedSewerDoor1",0.0f,false);
RemoveItem("LockedSewerDoorKey");
GiveSanityBoost();
PlayMusic("02_puzzle",false,100.0f,0.0f,1,false);
AddDebugMessage("The Door has successfully opened. Congratulations!", false);
}
and my .lang file:
Code:
<LANGUAGE>
<RESOURCES>
</RESOURCES>
<CATEGORY Name="CustomStoryMain">
<Entry Name="Description">My first level for Amnesia: The Dark Descent.[br]I created this level and hope you will enjoy it...</Entry>
</CATEGORY>
<CATEGORY Name="Ending">
<Entry Name="MyCredits">- A SLEAZY BIGFOOT PRODUCTION -[br][br][br]- MY FIRST LEVEL -[br] - HORROR SURVIVAL PUZZLES - [br][br][br]*Ideas:[br]Sleazy Bigfoot[br][br]*Level Design:[br]Sleazy Bigfoot[br][br]*Scripting:[br]Sleazy Bigfoot[br](And kinda Dark88)[br][br][br][br]*Special thanks to:[br]FRICTIONAL GAMES[br]Dark88[br][br][br]Thank you for playing. :)[br]Hope you enjoy this!</Entry>
</CATEGORY>
<CATEGORY Name="Inventory">
<Entry Name="ItemName_FirstCellDoorKey">the key to unlock the cell.</Entry>
<Entry Name="ItemDesc_FirstCellDoorKey">Tag reads "Cell room".</Entry>
<Entry Name="ItemName_LockedSewerDoorKey">the key to unlock the sewer exit.</Entry>
<Entry Name="ItemDesc_LockedSewerDoorKey">Tag reads "Sewer door".</Entry>
</CATEGORY>
<CATEGORY Name="Journal">
<Entry Name="Quest_Explore_Text">Where am I?, maybe I should explore.</Entry>
<Entry Name="Quest_CellIsLocked_Text">Find the key to open the locked cell door!</Entry>
<Entry Name="Note_StrangeNoises_Name">Daniel - 1824 - February 19th.</Entry>
<Entry Name="Note_StrangeNoises_Text">I have been hearing strange noises coming from below the cell downstairs.[br]
It sounds like people are getting murdered down there![br]
I am scared that it will eventually come to get me.[br]
[br]
I don't know what I should do.</Entry>
</CATEGORY>
<CATEGORY Name="Hints">
</CATEGORY>
<CATERGORY Name="Levels">
</CATEGORY>
</LANGUAGE>
I hope someone can help me :p