Author Topic: Adding sounds to vehicles?  (Read 1145 times)

Hey guys, is there a line of code or something I can use to add sounds to vehicles? I want an idle and "going" sound on the same vehicle. Idle = vehicle is below 5 MPH going=vehicle is above 5 MPH
Thank you.
I already have sounds that are:
-.ogg (i know, im converting them to .wav right now)
-below 1MB
-mono
« Last Edit: December 17, 2013, 03:11:07 PM by xSetrox »

Check out Kalphiter's train mod. His train has different sounds for different speeds it's traveling.

Check out Kalphiter's train mod. His train has different sounds for different speeds it's traveling.
hm, good idea

Check out Kalphiter's train mod. His train has different sounds for different speeds it's traveling.
I want it to play an idle sound though :c

Code: [Select]
function VEHICLENAMEvehicle::onadd(%this,%obj)
{
parent::onadd(%this,%obj);
    %obj.PlayAudio(0,IDLESOUNDSound);
}

And if you need the datablock for the looping idle sound, here:

Code: [Select]
datablock AudioDescription(VEHICLENAMELooping3d)
{
   volume   = 4.0;
   isLooping= true;

   is3D     = true;
   ReferenceDistance= 5.5;
   MaxDistance= 80.0;
   type     = $SimAudioType;
};
datablock AudioProfile(IDLESOUNDSound)
{
   filename    = "./FILENAME.wav";
   description = VEHICLENAMELooping3d;
   preload = true;
};
« Last Edit: December 20, 2013, 08:04:33 PM by Treti »

YEP i had alot of trouble doing this myself lol

i have script for vehicles with and without turret choose your favorite...

http://www.mediafire.com/download/abofb9m8318y6sn/scripts.zip