Amnesia Custom Story Key problems.
Greetings,
I have question,how to unlock a level door,to make a key that unlocks a level door? SetSwingDoorLocked? or there is another script function?
Also I tried to unlock a regular mansion door with key that I created on another map level.When I bring it in map with locked door,this key cannot unlock it =(
Maybe this is because the door is in 1.map and key for this door is on 2.map?
Please someone,I need help,cannot continue my latest custom story project(
The script :
void OnLeave()
{
AddEntityCollideCallback("Player", "QuestArea6", "MyRoom", true, 1);
AddEntityCollideCallback("Player", "QuestArea7", "MyRoom2", true, 1);
AddEntityCollideCallback("Player", "QuestArea8", "MyRoom3", true, 1);
AddEntityCollideCallback("Player", "SlimeFear", "Slimee", true, 1);
AddUseItemCallback("", "key_study_1", "leveldoor_3", "UnlockLevelDoor", true);
}
void UnlockLevelDoor(string &in asParent, string &in asChild, int alState)
{
AddPlayerSanity(10);
SetLevelDoorLocked("leveldoor_3", false, true);
PlaySoundAtEntity("", "unlock_door.snt", "leveldoor_3", 0, false);
RemoveItem("key_study_1");
CompleteQuest("searchquest2","SearchQuest2");
}
As I said,the door is in the first map,the key is in the other,please somebody help,let me know what I'm doing wrong.
Thanks earlier.
Egypt CS
![[Image: 27003.png]](http://button.moddb.com/popularity/medium/mods/27003.png)
(This post was last modified: 08-16-2014, 12:58 PM by Catalyst.)
|