HELP ME! ERROR IN AMNESIA! - 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: HELP ME! ERROR IN AMNESIA! (/thread-14331.html) |
HELP ME! ERROR IN AMNESIA! - Wapez - 03-29-2012 Hi I have 2 problems... when i unlock door_1 with key_1, door_2 is unlocked too. The other problem is that the explosion doesn't work. Please help. //=========================================== // Starter's Script File! //=========================================== //=========================================== // This runs when the map first starts void OnStart() { AddUseItemCallback("", "key_1", "door_1", "UsedKeyOnDoor", true); SetEntityPlayerInteractCallback("door_3", "doorexplode", true); AddUseItemCallback("", "key_2", "door_2", "UsedKeyOnDoor", true); } void UsedKeyOnDoor(string &in item, string &in door) { SetSwingDoorLocked("door_1", false, true); PlaySoundAtEntity("", "unlock_door", "door_1", 0, false); RemoveItem("key_1"); SetSwingDoorLocked("door_2", false, true); PlaySoundAtEntity("", "unlock_door", "door_2", 0, false); RemoveItem("key_2"); } void doorexplode(string &in asParent, string &in asChild, int alState) { SetPropHealth("door_3", 0.0f); PlaySoundAtEntity("", "react_breath_slow.snt", "Player", 0, false); PlaySoundAtEntity("", "react_scare", "Player", 0, false); PlaySoundAtEntity("", "explosion_rock_large.snt", "Player", 0, false); GiveSanityDamage(5.0f, true); } //=========================================== // This runs when the player enters the map void OnEnter() { } //=========================================== // This runs when the player leaves the map void OnLeave() { } RE: HELP ME! ERROR IN AMNESIA! - flamez3 - 03-29-2012 //=========================================== // Starter's Script File! //=========================================== //=========================================== // This runs when the map first starts void OnStart() { AddUseItemCallback("", "key_1", "door_1", "UsedKeyOnDoor", true); SetEntityPlayerInteractCallback("door_2", "doorexplode", true); } void UsedKeyOnDoor(string &in item, string &in door) { SetSwingDoorLocked("door_1", false, true); PlaySoundAtEntity("", "unlock_door", "door_1", 0, false); RemoveItem("key_1"); } void func_slam(string &in asParent, string &in asChild, int alState) { SetPropHealth("door_2", 0.0f); PlaySoundAtEntity("", "react_breath_slow.snt", "Player", 0, false); PlaySoundAtEntity("", "react_scare", "Player", 0, false); PlaySoundAtEntity("", "explosion_rock_large.snt", "Player", 0, false); GiveSanityDamage(5.0f, true); } Use this. Don't put callbacks anywhere other than void OnStart() { } RE: HELP ME! ERROR IN AMNESIA! - kartanonperuna - 03-29-2012 Wrong place to post this. |