This is Orbiter:
Ok what is wrong?
I have start =0 at the beginning.
then this:
case OAPI_KEY_K: // start
if (start=0)
start=0;
else
PlayVesselWave3(MySoundID,START,NOLOOP,255,22100);
start=1;
return 1;
So start should be 0 until K is pressed. If K is pressed then the wav is played and start =1
and this:
// engine sound
double pit = (vsAirSpeed * pit2) + 11025;
double sp = (190 +((vsAirSpeed)*5));
if (sp>=225)sp=225;
sprintf(oapiDebugString(),"anim %2.2f", start );
if (start=1){PlayVesselWave3(MySoundID,ENG,LOOP,sp,pit);
}
if ((vsAirSpeed == 0) & (start==1)) { PlayVesselWave3(MySoundID,ENG,LOOP,190);
}
}
so if start =1 vehicle is started after K was pressed. play wav
if start =0 not started skip
if start =1 (started) and VS =0 not moving play this wav
else nothing.
So unless it is started no wav should play.
the variable "double start=0 is set at thefirst. When I start the scenario. start shows up as 1 , before pressing K and I can press k and the start wav plays.
It compiles fine