AmbientSoundChangeDay(object, int)
エリアの日中背景音を変更します。
action AmbientSoundChangeDay( object oArea, int nTrack );
Parameters
oArea
変更したいエリア
nTrack
使用する背景音サウンドトラック
Description
oAreaの日中の背景音をnTrackへ変更します。nTrackは背景音トラックで与えられる整数です。
Remarks
背景音サウンドトラックはambientmusic.2daの中で参照されますが、それらの整数は定数として公表されていません。そのファイルは/musicディレクトリの*.bmu files(これらは別の名前のただの.mp3ファイルなのですが)として表されています。
もしそれらが消されれば、背景音も止まるでしょう。
Version
1.22
Example
// A trigger's OnEvent script:
void main()
{
object oArea = GetArea(OBJECT_SELF);
MusicBackgroundStop(oArea); // Shut the music up
AmbientSoundChangeDay(oArea, 46); // al_an_lzrdflk1
AmbientSoundChangeNight(oArea, 46); // al_an_lzrdflk1
AmbientSoundPlay(oArea); // In case it's off
AmbientSoundSetDayVolume(oArea, 100); // In case it's too quiet
AmbientSoundSetNightVolume(oArea, 100); // In case it's too quiet
// Start the music up again.
DelayCommand(30.0, MusicBackgroundPlay(oArea));
}
/* From the Prelude, AREA_M1Q0C_4:
AmbientSoundChangeDay(OBJECT_SELF,26);
AmbientSoundChangeNight(OBJECT_SELF,26);
MusicBackgroundStop(OBJECT_SELF); */
See Also
| functions: | AmbientSoundChangeNight | AmbientSoundPlay | AmbientSoundSetDayVolume | AmbientSoundSetNightVolume | AmbientSoundStop | SoundObjectPlay |
| categories: | Area Functions | Sound Effects Functions |
author: Iskander Merriman, editor: Dave Robinson, JP team: Redondo
Send comments on this topic.