![]() |
How to make an intro? - 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 an intro? (/thread-23970.html) |
How to make an intro? - goodcap - 11-29-2013 This is what I want to do. When you click start, you see just a black screen and you hear a voice telling something about the story with some backround music, then the blackness fades out and the game begins. How do I make this happen? Thanks RE: How to make an intro? - RaideX - 11-29-2013 this is done pretty simple: first, under your OnStart() section you code the following PHP Code: OnStart() { The AddTimer is the timer for when you want stuff to happen. When you want the screen to go normal again, you either do it with an extra timer or you include it in your function somewhere. I've get something similar in my full conversion, maybe you'r interested but you can take a look if you want. (Added as attachment and you will have to re-save it as a .hps file as i couldn't upload it in that format for some reason) EDIT: If you have more questions, feel free to ask at any time! RE: How to make an intro? - PutraenusAlivius - 11-29-2013 Here's your script. The Voice must have the Background Music added on it's .ogg file. If I recall correctly. PHP Code: void OnStart() RE: How to make an intro? - goodcap - 11-30-2013 (11-29-2013, 01:52 PM)JustAnotherPlayer Wrote: Here's your script. The Voice must have the Background Music added on it's .ogg file. If I recall correctly. Okay, everything works except for the fade in. The game starts out with a black screen and the voice starts. that works, but after the voice the screen continue to be black. What did I forget? void OnStart() { FadeOut(0); AddTimer("Opening", 5.0f, "OpeningIntro"); //5.0f is how long the voice will start } void OpeningIntro(string &in asTimer) { AddEffectVoice("record_music.ogg", "EffectToPlay", "TextCategory", "TextEntry", true, "TheEntityWhereTheSoundOriginates", 1, 10); } RE: How to make an intro? - RaideX - 11-30-2013 You forgot to use the function to fade the screen to normal again ![]() You should change your code to something similar to this: PHP Code: void OnStart() RE: How to make an intro? - goodcap - 12-01-2013 (11-30-2013, 08:01 PM)RaideX Wrote: You forgot to use the function to fade the screen to normal again Thanks so much, dude. It works now ![]() Could help me with something else please, I want to make it that when you enter a certain area a message pops up. RE: How to make an intro? - RaideX - 12-01-2013 Quote:Thanks so much, dude. It works now Glad it worked ![]() PHP Code: OnStart() { Regarding the .lang file: You basically have to write your text in this file and tell the game then where to get the text to display from. Oh and of course you will have to create the "CollideArea" with the level editor, just in case you didn't know. EDIT: You can also get EVERYTHING you want to code on this site. |