Working AMFP Phone Box for Amnesia (download) - 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 Resources (https://www.frictionalgames.com/forum/forum-42.html) +---- Thread: Working AMFP Phone Box for Amnesia (download) (/thread-52892.html) |
Working AMFP Phone Box for Amnesia (download) - Mudbill - 10-15-2016 I can understand that people had issues porting this particular entity over to TDD, though it was quite fun to do I must admit. So here it is folks. There are some things you need to know if you want to use this entity though.
You could always script your own version of the phone, like if you need to tweak anything in the "internal" (so to speak) coding I did, feel free to do so, but for most applications, what I have should be perfectly fine. You can download the entity here Here's a vid btw. Ok, on to the instructions: First off, paste this script anywhere into your level's .hps file (for example at the very bottom). You're not required to read the script or know how it works, but it MUST be included if you wish to use the function below. Spoiler below!
Once you have that script, you can use this function to configure your phone box: PHP Code: void StartPhoneRinging(string &in asEntity, string[] &in asAudioFiles, string &in asSubCat, string[] &in asSubEntries, Callback syntax: void MyFunc(string &in asEntity) asEntity - The phone box entity. asAudioFiles - An array containing a list of all the audio files you wish to play when the phone is picked up. asSubCat - The .lang category for your subtitles. asSubEntries - An array containing a list of all the subtitle entries to display. I recommend it has the same length as the audio files. asCallback - A callback that is called when the entire phone sequence has finished. If you're unsure how to use the arrays, create them like so: PHP Code: string[] example_array = {"item1", "item2", "item3"}; Then you just give the function this example_array as an argument. Do this for both the audio files and subtitle entries. Here's an example of how you can implement it. Spoiler below!
Oh, and as for installation, you place the "phone_box" folder within the downloaded archive inside your Amnesia/entities/custom/ folder (create a custom folder if you wish). Remember to also keep a copy of the phone box within your mod's or custom story's directories when you export it. If you use this, then credits would be nice. |