Author Topic: Giving the Biplane sound (SOLVED)  (Read 729 times)

Since the minigun problem was fixed so darn fast, I thought id try and get the biplane to have an idle sound and then work from there. So far I have done some copy pasta from the spitfire by Strato and changed around names so they are appropriate, added a sounds folder and the idle sound loaded the sound with

datablock AudioProfile(BiplaneidleSound)
{
   filename    = "./sounds/idle.wav";
   description = AudioDefaultLooping3d;
   preload = true;
};


and then I'm trying to call that in biplanecontrailcheck as a last ditch effort to get it to play when the propeller changes speed, an I've also tried calling it in with

    if(%speed < 5)
   {
      if(%obj.prop !$= "slow")
      {
            %obj.PlayAudio(0,BiplaneidleSound);
         %obj.playThread(0,propslow);
         %obj.prop = "slow";

      }
   }
   else
   {
      if(%obj.prop !$= "fast")
      {
            %obj.PlayAudio(0,BiplaneidleSound);
         %obj.playThread(0,propfast);
         %obj.prop = "fast";
      }
   }



as well as in

function Biplanevehicle::onadd(%this,%obj)
{
   parent::onadd(%this,%obj);
   %obj.PlayAudio(0,BiplaneidleSound);
....
}


If Im just asking stuff to much I can tone it down. I figure the best way for me to learn whats going on in the game is to get some help from people who really DO get it. Its also frustrating when it works perfectly fine in a few other addons and i cannot find any difference between those scripts and mine......

« Last Edit: February 27, 2016, 04:57:44 AM by Pies and Muffins »

FIXED!, like an idiot i overlooked the fact that my file name didnt match what i was asking it to look for as a sound file!