PDA

View Full Version : Dlgeditor v2.3.0 how do I add sounds?


Randydgx
05-08-2007, 12:19 AM
I use dlgeditor v2.3.0 and i want to add an alarm going off on my terminal. I see a place for sound, but how do i know what to put in there? Is it the filename under streamsounds? I tried that but I heard no sound.
Thanks,
Randy

stoffe
05-13-2007, 04:14 PM
I use dlgeditor v2.3.0 and i want to add an alarm going off on my terminal. I see a place for sound, but how do i know what to put in there? Is it the filename under streamsounds? I tried that but I heard no sound.


This is probably better done using a placeable sound object for the alarm, since the sound would stop as soon as the terminal moves on to another node if you set the sound as Voiceover sound.

Create a placeable sound (UTS file) and place it in the game world next to the terminal (or where you want the sound to come from). Copy&paste an existing UTS file to make it easier to modify it, rename it to alarm.uts, and then set the following fields:

Continuous - 1
Interval - 1000
MaxDistance - 64 (radius in meters where sound can be heard)
MinDistance - 48 (radius in meters where sound is hard at full strength)
Positional - 0 (play everywhere in the area)
Priority - 21
Tag - alarm
TemplateResRef - alarm
Times - 3
Volume - 127
[b]Sounds --> 0 --> Sound (ResRef) - amb_alarm_01 (or whatever sound you use)

Set everything else to 0.

Then run a script like this from the dialog node where you want to trigger the alarm:


void main() {
object oSound = GetObjectByTag("alarm");
SoundObjectPlay(oSound);
DelayCommand(4.0, SoundObjectStop(oSound));
}


Change the part in red to the Tag of your placeable sound, and the part in red to the number of seconds you want the alarm siren to sound.