The shooting down sucks, I can improve it.
function SpitfireSpeedCheck(%this, %obj)
{
if(!isObject(%obj))
return;
%vehicle = %obj;
%slot = 0; //Play the sound in the driver's spot
%speed = vectorLen(%obj.getVelocity());
if(%speed < 0) //Keeps throwing random negative numbers when train is at dead stop
%speed = 0;
if(%speed < 10)
%vehicle.playAudio(%slot, SpitfireidleSound);
else if(%speed < 30)
%vehicle.playAudio(%slot, Spitfirethrottle1Sound);
schedule(500,0,"SpitfireSpeedCheck",%this,%obj);
}
//Keeps throwing random negative numbers when train is at dead stop
Oh, nice, feel free to credit me.