Facebook Twitter YouTube Frictional Games | Forum | Privacy Policy | Dev Blog | Dev Wiki | Support | Gametee


Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Making an Introduction & more
Romulator Offline
Not Tech Support ;-)

Posts: 3,628
Threads: 63
Joined: Jan 2013
Reputation: 195
#3
RE: Making an Introduction & more

JustAnotherPlayer beat me again. Posted anyways Tongue
Do your best to use us both. We both have not done everything mentioned, but can be a good intro if done well.

Okay, we have a lot here.
I will put the stuff into spoilers as I go.

Introductive commentary
Spoiler below!

Commentary recorded by Audacity and exported as an .ogg file is supposed to work just fine. The code for playing the sound is as follows:
PlayEffectVoice("CH01L00_DanielsMind01_", 1, 1, "IntroSequenceVoiceOver");
//Taken from the first level
Replace the first set of quotation marks with the name of your .ogg file. IntroSequenceVoiceOver is another callback which you can call later, but if you do not need to do that callback, just make it "".

Unfortunately, I cannot find anything on the subtitles :/


Making the character walk in an intro
Spoiler below!

As far as my knowlege of coding in Amnesia goes, I do not know if this is possible. Throughout Amnesia, I do not know if this actually occurs either. What you can do however is make the player focus entirely on one ScriptArea, to make the player assume he/she is to go that way. To make the game fade out, there is simple coding for that too, and teleporting also.

If I was doing what I said above, it would look something like this:
void OnStart()
{
StartPlayerLookAt("lookatthisareafirst", 6, 6, "");
AddTimer("", 3.0f, "FadeIn1");
FadeOut(0.001f);
}

void FadeIn1(string &in asTimer)
{        
FadeIn(3.0f);
AddTimer("", 6.0f, "FadeOut1");
}

void FadeOut1(string &in asTimer)
{
FadeOut(3.0f);
StartPlayerLookAt("lookatthisareafirst", 6, 6, "");
AddTimer("", 6.0f, "FadeIn2");
}

void FadeIn2(string &in asTimer)
{
FadeIn(3.0f);
TeleportPlayer("SecondIntro");
}
And would continue in a similar fashion to that. You can read about what each does in the wiki =adduseitemcallback]here if you have issues understanding some of the code above.


Commentary playing on FadeIn()
Spoiler below!

Add the code I used in the first spoiler into the code in the second spoiler after FadeIn(3.0f); is called.


Flashbacks
No spoiler because I cannot do these yet Tongue

Music and Custom Sounds
Spoiler below!


Let me first warn you, this is a big spoiler

Music is easy. Assuming that like you said, you placed them in a music folder, you can call them into your story with this code:
PlayMusic(string& asMusicFile, bool abLoop, float afVolume, float afFadeTime, int alPrio, bool abResume);
What this gibberish means is this:
asMusicFile - the music to play + extension .ogg
abLoop - determines whether a music track should loop
afVolume - volume of the music
afFadeTime - time in seconds until music reaches full volume
alPrio - priority of the music. Note that only the music with the highest priority can be heard! 0 - lowest, 1 - higher, etc.
abResume - if true, playback will be continued from where the track stopped after the call to StopMusic(); if false, the track will be restarted.

So an example of this code would be:
PlayMusic("callmemaybe_carly.ogg", false, 1.0f, 1.0f, 1, false);

If I put this into the OnStart()

void OnStart()
{
PlayMusic("callmemaybe_carly.ogg", false, 1, 1, 1, false);
}

I would assume Call Me Maybe by Carly Rae Jepsen would play when the game starts.

Sound files are similar, but are called differently.
PlaySoundAtEntity(string& asSoundName, string& asSoundFile, string& asEntity, float afFadeTime, bool abSaveSound);

And what THIS gibberish means is this:

asSoundName - internal name
asSoundFile - the sound to use + extension .snt
asEntity - the entity to create the sound at, can be “Player”
afFadeTime - time in seconds the sound needs to fade. Avoids enemies hearing the sound if afFadeTime is at least 0.1f
abSaveSound - if true, a looping sound will “remember” its playback state (currently playing/stopped), and that state will be restored the next time the level is entered. If true, the sound is never attached to the entity! Note that saving should only be used on looping sounds!

The main difference is that it calls the .snt of a file, which you just copy and paste from anything which Amnesia calls as the .snt. You just have to edit the stuff in it as if it were in NotePad.

PlaySoundAtEntity("thesound", "mgs1bleep.snt", "Player", 1.0f , false);

And if I did what I did with Carly Rae, this would play the alert sound a guard makes from Metal Gear Solid when he spots Snake.


Comment here if needed Smile

Discord: Romulator#0001
[Image: 3f6f01a904.png]
(This post was last modified: 04-22-2013, 08:49 AM by Romulator.)
04-22-2013, 08:48 AM
Find


Messages In This Thread
Making an Introduction & more - by T122002 - 04-22-2013, 03:51 AM
RE: Making an Introduction & more - by T122002 - 04-22-2013, 05:05 PM
RE: Making an Introduction & more - by Romulator - 04-23-2013, 07:36 AM
RE: Making an Introduction & more - by Romulator - 04-22-2013, 08:48 AM



Users browsing this thread: 1 Guest(s)