how to make a jumpscare screen? - 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: how to make a jumpscare screen? (/thread-24501.html) |
how to make a jumpscare screen? - Radical Batz - 01-31-2014 Now I don't know how to do this but I would like to know how! In my custom story, when the player opens this door I want the screen to squeeze in and a soundtrack will play and I want the player to gasp, how do I do that? it's similar to the part where you open the last door at the sewer in the original amnesia game and you'll find grunt body parts, you know what I mean? What's the whole code of that pls RE: how to make a jumpscare screen? - Tiger - 01-31-2014 Put a scriptArea in the doorway and make it call a function with Code: void MyFunc(string &in asEntity) Code: void PlaySoundAtEntity(string& asSoundName, string& asSoundFile, string& asEntity, float afFadeTime, bool abSaveSound); If you need more help I could take some more time to help you with the specifics, but yeah. That's what you got to do. RE: how to make a jumpscare screen? - Radical Batz - 01-31-2014 I found this in the code of the sewer of the part where you open the door with lots of grunt parts and it did not have void my func, it had this instead void CollideGruntCorpse(string &in asParent, string &in asChild, int alState) { GiveSanityDamage(10, true); PlayMusic("20_event_darkness.ogg", false, 1.0, 0, 20, false); } should I use that? and in the level editor of the sewer it had a script area near the door called "AreaGruntCorpse" RE: how to make a jumpscare screen? - FlawlessHappiness - 01-31-2014 You need to understand. When something says "MyFunc" is just another way of saying "MyFunction". Meaning it's a placeholder for the real name of the function. In the code you found, the name of the function is "CollideGruntCorpse". You can see it's a collidefunction because it has (string &in asParent, string &in asChild, int alState). What you experienced in that particular place is probably that the door is colliding with a script area, it calls the function. So it's not when you touch it, but when the door opens. Therefore this function will not work, unless you set up your level as if you opened a door. Also, for a script to work you must have in your "void OnStart()" function, a line saying that you want to add a function that creates the jumpscare. In this case you will be needing: PHP Code: AddEntityCollideCallback(string& asParentName, string& asChildName, string& asFunction, bool abDeleteOnCollide, int alStates); If you put this in your "void OnStart()" function it tells the script to add a collide function. Now you have to fill in all the data that it needs. You can get explained what the different things mean here: http://wiki.frictionalgames.com/hpl2/amnesia/script_functions Press Ctrl+F or Cmd+F to search for the specific function: "AddEntityCollideCallback", to find it. Do you understand? |