Frictional Games Forum (read-only)

Full Version: Help for my custom story
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi People Big Grin

I need help to do my custom story, When the map started, i want have a sound, and after that, another sound. Is it possible?

(I want to make a sound that says that someone locked the door)

And I will also be a time when the player looks at a door stop after watching, and the door closes violently.

Can anyone help me?

Thank.

(Sorry for my bad english)
Code:
void PlayMusic(string& asMusicFile, bool abLoop, float afVolume, float afFadeTime, int alPrio, bool abResume);

Plays music.

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 - highest, 1 - lower, etc

After the player is in area (for example of course) you set music. That's all
Music? No, I want her playing a 2 sounds one after the other.
But I do not know if such a code is able to walk.

Code:
void PlaySoundAtEnter
{

PlaySoundAtEntity();
PlaySoundAtEntity();

}

Code:
void OnStart()
{
PlaySoundAtEntity(string& asSoundName, string& asSoundFile, string& asEntity, float afFadeTime, bool abSaveSound); //first sound
AddTimer("blehblöh", 2.0f, "StartSecondSound");
}

void StartSecondSound(string &in asTimer)
{
PlaySoundAtEntity(string& asSoundName, string& asSoundFile, string& asEntity, float afFadeTime, bool abSaveSound); //second sound
}

when game starts, that first sound comes out and then 2 seconds after the next
Hey Thank its working Big Grin

Now I want to do at the beginning of the map there is a black screen and it disappears slowly.

Its possible ?

Thank Tongue

EDIT: I also want the command to close a door violently, Thank.
Anyone can help me ? Rolleyes
Well look, we're not hear to full you on every single one of your needs. You might as well learn the proper way.

Here you go. You better thank me, you should bookmark this:

http://wiki.frictionalgames.com/hpl2/amn..._functions

FadeOut(0);
FadeIn(5);

That's all I'll give you. -_-
These into onstart:
FadeOut(0);
FadeIn(5.0f);

5 second fade in

to close a door:
SetSwingDoorClosed("yourdoorsname", true, false);
(07-09-2011, 06:37 PM)Khyrpa Wrote: [ -> ]These into onstart:
FadeOut(0);
FadeIn(5.0f);

5 second fade in

to close a door:
SetSwingDoorClosed("yourdoorsname", true, false);

I don't think the SetSwingDoorClosed will work.

You need to have a prop force/impulse for it to work.
Thank you for your help Big Grin

I will try it.