Author Topic: tree scripting  (Read 1577 times)

can someone give me a script or help me make trees get chopped down by axes well weapons

HMK

I've got an idea of how that can be done, I'll do it when I get back from school.

HMK

Try modifying this script found in the axe.dts until I get back.

Quote
}

$TreeGrow = 1000;
$TreeGrowInc = 1000;
$MaxTreeHits = 20;

function growTree(%pos)
{
   %x = getWord(%pos,0);
   %y = getWord(%pos,1);
   %z = getWord(%pos,2);
   %pos = %x SPC %y SPC %z;
     %this = new StaticShape() {
           position = %pos;
            rotation = "1 0 0 0";
            scale = "0.1 0.1 0.1";
            dataBlock = "pineTree";
      };

   %this.startFade(0, 0, true);
   %this.hide(true);
   %this.totalHits = 0;

   %this.schedule($TreeGrow, "hide", false);
      %this.schedule($TreeGrow + 100, "startFade", 1000, 0, false);

   for(%t = 1; %t < 11; %t++)
   {
         %this.schedule($TreeGrow + ($TreeGrowInc * %t), "setScale",%t/10 SPC %t/10 SPC %t/10);
   }

You could try copy and pasting it into the weapons you want, I don't know. You might have to do something with the tree .cs file too.