![]() |
Level door issue - 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: Level door issue (/thread-14231.html) |
Level door issue - Twitchez - 03-25-2012 Hey everyone! As I was scripting and doing the last touches on my map, I wanted to create a level door to my next map. *Le Twitchez does a some searches and finds out he has to go to the level door, enter the "Entity" tab and just enter the .map file he wanted it to lead to. It would be easy they said, just do that and add the Player_start areas they said... Well it almost worked out. I have a fully functional "UsedKeyOnDoor" function as I heard people here describe it. But after I try to click it when I unlocked my door, it just doesnt work. If you have any things that could explain this (expect that I "misspelled" the other maps name), please write ![]() // Best Regards, Twitchez RE: Level door issue - pandasFTW - 03-25-2012 there could be quite some problems with what you described there, can you send me your .hps file, either in PM or over this topic? then i,ll try my best to help ![]() RE: Level door issue - Twitchez - 03-25-2012 Sure ![]() //////////////////////////// // Run first time starting map void OnStart() { wakeUp(); PlayGuiSound("break_wood1.ogg", 1); PlayGuiSound("general_thunder1.ogg", 1); SetPlayerLampOil(0); PlayMusic("react_breath1",false,100.0f,0.0f,1,false); AddUseItemCallback("", "key_classroom_1", "classroom_1", "KeyOnDoor", true); AddUseItemCallback("", "key_out1", "level_wood_1", "KeyOnDoor_1", true); AddEntityCollideCallback("Player", "Screamarea_1", "Get_Scared", true, 1); AddEntityCollideCallback("Player", "Screamarea_2", "Stop_Scared", true, 1); SetEntityPlayerInteractCallback("key_classroom_1", "func_slam", true); SetPlayerSanity(15); } void TimerDoneLookAt(string &in asTimer) { StopPlayerLookAt(); } void DoorLockedPlayer(string &in entity) { SetMessage("Messages", "msgname", 0); } void DoorLockedPlayer_1(string &in entity) { SetMessage("Messages", "msgname_1", 0); } void func_slam(string &in asEntity) { SetSwingDoorClosed("classroom_2", true, true); PlaySoundAtEntity("", "react_breath_slow.snt", "Player", 0, false); PlaySoundAtEntity("", "react_scare", "Player", 0, false); PlaySoundAtEntity("", "close_door.snt", "Player", 0, false); GiveSanityDamage(5.0f, true); } void Get_Scared(string &in asParent, string &in asChild, int alState) { PlayMusic("00_laugh.ogg", false, 3.0, 0.0, 0, true); SetPlayerActive(false); StartPlayerLookAt("AreaLookAt", 2, 2, ""); AddTimer("look01", 2.5f, "AreaLookAt"); SetPlayerActive(true); } void Stop_Scared(string &in asParent, string &in asChild, int alState) { StopPlayerLookAt(); } void KeyOnDoor(string &in asItem, string &in asEntity) { SetSwingDoorLocked("classroom_1", false, true); PlaySoundAtEntity("", "unlock_door", "classroom_1", 0, false); RemoveItem("key_classroom_1"); } void KeyOnDoor_1(string &in asItem, string &in asEntity) { SetSwingDoorLocked("level_wood_1", false, true); PlaySoundAtEntity("", "unlock_door", "level_wood_1", 0, false); RemoveItem("key_out1"); } void wakeUp () { FadeOut(0); // Instantly fades the screen out. (Good for starting the game) FadeIn(6); // Amount of seconds the fade in takes FadeImageTrailTo(2, 2); FadeSepiaColorTo(100, 4); SetPlayerActive(false); PlayGuiSound("break_wood1.ogg", 1); PlayGuiSound("general_thunder9.ogg", 1); FadePlayerRollTo(50, 220, 220); // "Tilts" the players head FadeRadialBlurTo(0.15, 2); SetPlayerCrouching(true); // Simulates being on the ground AddTimer("trig1", 5.0f, "beginStory"); // Change '11.0f' to however long you want the 'unconciousness' to last } void beginStory(string &in asTimer){ ChangePlayerStateToNormal(); SetPlayerActive(true); FadePlayerRollTo(0, 33, 33); // Change all settings to defaults FadeRadialBlurTo(0.0, 1); FadeSepiaColorTo(0, 4); SetPlayerCrouching(false); FadeImageTrailTo(0,1); } //////////////////////////// // Run when entering map void OnEnter() { PlayMusic("09_amb_safe.ogg", true, 0.7f, 1, 0, true); } //////////////////////////// // Run when leaving map void OnLeave() { } RE: Level door issue - pandasFTW - 03-25-2012 ah i found the problem, it was a LEVELdoor you wanted to unlock with a key wasnt it? if it was, then it shouldent be "setswingdoorlocked" when its a level door, it is supposed to be "SetLevelDoorLocked" ![]() ![]() (03-25-2012, 02:57 PM)pandasFTW Wrote: ah i found the problem, it was a LEVELdoor you wanted to unlock with a key wasnt it? if it was, then it shouldent be lol i made a typo, it was suppsed to be " keep in mind the " setswingdoorlocked " haha sorry ![]() RE: Level door issue - Twitchez - 03-25-2012 Thanks man ![]() //Thread closed |