Blockland Forums > Help

Halp modifying game.

Pages: (1/4) > >>

Darksaber530:

I want to replace the default "jump.wav" sound with a sound of my own, but everytime in v20 when i put it in

C: - Users - (username) - My Documents - Blockland - Base - Data - Sounds , it replaces it with the default jumping sound!

Please Help, Carbon Zypher

The Corporation:

That's because the launcher reloads all game files, thus overwriting your jump sound.
You would have to do this through the use of an addon.

Darksaber530:

How would i do that?


The Corporation:


--- Quote from: Darksaber530 on October 13, 2011, 05:09:26 PM ---How would i do that?


--- End quote ---
I honestly don't really know the specifics, and if I were to take a stab at this, it would be a few months before I got done.
So wait for the next update or something.

Darksaber530:

Would this code suffice?

new AudioProfile(JumpSound)
{
   fileName = "Add-Ons/Client_JumpSound/sounds/noise.wav";
   description = AudioGui;
   preload = true;
};

if($Pref::Client::JumpSound $= "")
   $Pref::Client::JumpSound = true;

package cJumpsounds
{
   function Jump(%wat,%lol,%m,%msg,%a0,%a1,%a2,%a3,%a4,%a5,%a6,%a7,%a8,%a9)
   {
      Parent::Jump(%wat,%lol,%m,%msg,%a0,%a1,%a2,%a3,%a4,%a5,%a6,%a7,%a8,%a9);
      if(%msg !$= "" && getSimTime()-100 > $JumpTime && $Pref::Client::JumpSound)
      {
         $JumpTime = getSimTime();
         alxPlay(JumpSound);
      }
   }
};
activatePackage(cJumpsounds);

function toggleJumpSound(%val)
{
   if(%val)
   {
      $Pref::Client::JumpSound = $Pref::Client::JumpSound ? false : true;
      clientCmdServerMessage('',"Jump Sounds enabled: " @ $Pref::Client::JumpSound);
   }
}

function AddBind(%division, %name, %command)
{
   for(%i=0;%i<$remapCount;%i++)
   {
      if($remapDivision[%i] $= %division)
      {
         %foundDiv = 1;
         continue;
      }
      if(%foundDiv && $remapDivision[%i] !$= "")
      {
         %position = %i;
         break;
      }
   }
   if(!%foundDiv)
   {
      error("Division not found: " @ %division);
      return;
   }
   if(!%position)
   {
      $remapName[$remapCount] = %name;
      $remapCmd[$remapCount] = %command;
      $remapCount++;
      return;
   }
   for(%i=$remapCount;%i>%position;%i--)
   {
      $remapDivision[%i] = $remapDivision[%i - 1];
      $remapName[%i] = $remapName[%i - 1];
      $remapCmd[%i] = $remapCmd[%i - 1];
   }
   $remapDivision[%position] = "";
   $remapName[%position] = %name;
   $remapCmd[%position] = %command;
   $remapCount++;
}


Pages: (1/4) > >>

Go to full version