BGM17 Posted May 12, 2015 Report Share Posted May 12, 2015 hey, is there anyway to make it so when a specific vehicle is operational an audio track plays? For example, a loop of the pump working and radio messages being received? Quote Link to comment Share on other sites More sharing options...
Chris07 Posted May 17, 2015 Report Share Posted May 17, 2015 Assuming the vehicle is stationary when you are making the sound you can useAudio::PlaySample3D(const char *File_, const Vector &Pos_, bool looping_ = false);/*Example use to Play the sound and loop it*/Vehicle v(Caller);int soundID = Audio::PlaySample3D("mod:Audio/Path/To/AudioFile.wav",v.GetPosition(), true);/*To Stop playing the sound:*/Audio::StopSample(soundID);/*If the Vehicle is moving you need to constantly call the following method to keep the sound aligned with the vehicle:*/Audio::UpdatePos(soundID, v.GetPosition(), true);/*Volume can be modified by:*/Audio::SetVolume(soundID, float volume_level);It's all pretty much the same implementation as sirens. Quote Link to comment Share on other sites More sharing options...