Hi,
Not sure why this is not working. But if you press a key then Ignition_check=YES_start otherwise Ignition_check = No_start.
that works. And if you press the k you get a strt sound. Then the engine sound comes on. But If you press the ignition key
again. I want no sound. I still hear the engine.
// engine sound
double pit = (vsAirSpeed * pit2) + 11025;
double sp = (190 +((vsAirSpeed)*15));
if (sp>=225)sp=225;
// Only turn on the engine sound if it is not already running AND if velocity is >= 10 meters-per-second;
// otherwise, only turn OFF the engine sound if it is running AND if velocity is < 10 meters-per-second.
if (!IsPlaying3(JohnSoundID, ENG) && (vsAirSpeed >= 0)&& (IGNITION_check == YES_START))
{
// turn on the engine sound
PlayVesselWave3(JohnSoundID,ENG,LOOP,190);
}
else if (IsPlaying3(JohnSoundID, ENG) && (vsAirSpeed < 0))
{
// turn off the engine sound
StopVesselWave3(JohnSoundID, ENG);
}