![]() |
Basic Elevator - 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: Basic Elevator (/thread-16441.html) |
RE: Basic Elevator - Cruzore - 06-23-2012 Because there is no timer in the Interaction function that tells you to fade in. I will update my above post in a second with the fixed one, so you can use it. RE: Basic Elevator - Unearthlybrutal - 06-23-2012 void OnStart() { AddUseItemCallback("", "Room_Key", "RoomDoor", "RoomOpened", true); AddEntityCollideCallback("Player", "ClosetShut", "ClosetShutFunc", true, 1); AddEntityCollideCallback("Player", "EasterEggOpen", "EasterEggFunc", true, 1); AddEntityCollideCallback("Player", "EasterEggActive", "EasterEggFunction", true, 1); AddEntityCollideCallback("Player", "FadeIn", "FadeInFunction", true, 1); PlayMusic("Ambient_Ghost",true,1,0,0,false); FadeOut(0); // Instantly fades the screen out. (Good for starting the game) FadeIn(20); // Amount of seconds the fade in takes FadeImageTrailTo(2, 2); FadeSepiaColorTo(100, 4); SetPlayerActive(false); FadePlayerRollTo(50, 220, 220); // "Tilts" the players head FadeRadialBlurTo(0.15, 2); SetPlayerCrouching(true); // Simulates being on the ground AddTimer("trig1", 11.0f, "beginStory"); // Change '11.0f' to however long you want the 'unconciousness' to last ChangePlayerStateToNormal(); SetPlayerActive(true); FadePlayerRollTo(0, 33, 33); // Change all settings to defaults FadeRadialBlurTo(0.0, 1); FadeSepiaColorTo(0, 4); SetPlayerCrouching(false); FadeImageTrailTo(0,1); SetEntityPlayerInteractCallback("ButtonTeleport", "Interaction", false); } void ButtonDownMessage(string &in entity) { SetMessage("Messages", "ElevatorDown", 0); } void FadeInFunction(string &in asParent, string &in asChild, int alState) { FadeIn(20); } void Interaction(string &in asEntity) { TeleportPlayer("StartElevator"); FadeOut(0); FadeIn(4); PlaySoundAtEntity("", "14_elevator_activate.snt", "Player", 0, true); } void EasterEggFunction(string &in asParent, string &in asChild, int alState) { SetEntityActive("EasterEggOpen", true); } void ClosetShutFunc(string &in asParent, string &in asChild, int alState) { SetSwingDoorClosed("ExorcistCloset", true, true); PlaySoundAtEntity("", "react_breath_slow.snt", "Player", 0, false); PlaySoundAtEntity("", "react_scare", "Player", 0, false); PlaySoundAtEntity("", "close_door.snt", "Player", 0, false); GiveSanityDamage(55.0f, true); } void EasterEggFunc(string &in asParent, string &in asChild, int alState) { SetSwingDoorLocked("EasterEggDoor", false, true); PlaySoundAtEntity("", "unlock_door.snt", "Player", 0, false); } void RoomOpened(string &in item, string &in door) { SetSwingDoorLocked("RoomDoor", false, true); PlaySoundAtEntity("", "unlock_door", "RoomDoor", 0, false); RemoveItem("Room_Key"); } void RoomMessage(string &in entity) { if(GetSwingDoorLocked("RoomDoor") == true) { SetMessage("Messages", "RoomMSG", 0); } } void OnEnter() { } void OnLeave() { } (06-23-2012, 09:04 PM)FastHunteR Wrote: Because there is no timer in the Interaction function that tells you to fade in. I will update my above post in a second with the fixed one, so you can use it.There's no need to use timer RE: Basic Elevator - MaZiCUT - 06-23-2012 The Fade in and out works, the sound too, but the thing is he never teleports, he's at the same position fading out fast and fading in so i can press the button repeadetly for the same thing to happend over and over. The area i want him to teleport to i made it a ScriptArea called StartElevator RE: Basic Elevator - Unearthlybrutal - 06-23-2012 (06-23-2012, 09:10 PM)CrazyArts Wrote: The Fade in and out works, the sound too, but the thing is he never teleports, he's at the same position fading out fast and fading in so i can press the button repeadetly for the same thing to happend over and over. The area i want him to teleport to i made it a ScriptArea called StartElevatorit needs to be PlayerStartArea ("PlayerStart" in the level editor) and not script area RE: Basic Elevator - MaZiCUT - 06-23-2012 Ok thanks, i'll try that. Yess it works!! Thank you everyone! RE: Basic Elevator - Unearthlybrutal - 06-23-2012 No problem! ![]() |