Author Topic: Trench Digging [BETA Release V4]  (Read 24723 times)

Change the dirtColor number in RTB Preferences to the colorId of a brown in your colorset.
Why aren't you using getClosestPaintColor yet?

Why aren't you using getClosestPaintColor yet?
He didn't know about it? Not everyone is up to par with you oh greatness.

Why aren't you using getClosestPaintColor yet?
He didn't know about it? Not everyone is up to par with you oh greatness.

This short conversation just made my night.

He didn't know about it? Not everyone is up to par with you oh greatness.
For your information, I told him about it and gave him the code block for it several days ago. Kindly be an ass elsewhere.

Here is a getClosestPaintColor function created by Space Guy:
Code: [Select]
function getClosestPaintColor(%rgba)
{
 %prevdist = 100000;
 %colorMatch = 0;
 for(%i = 0; %i < 64; %i++)
 {
  %color = getColorIDTable(%i);
  if(vectorDist(%rgba, getWords(%color, 0, 2)) < %prevdist && getWord(%rgba, 3) - getWord(%color, 3) < 0.3 && getWord(%rgba, 3) - getWord(%color, 3) > -0.3)
  {
   %prevdist = vectorDist(%rgba,%color);
   %colormatch = %i;
  }
 }
 return %colormatch;
}
I just thought you might wanna use this for your Infinite Mining mod to work on any colorset.

Why aren't you using getClosestPaintColor yet?
Because of this reason:
I've got an idea, instead of checking for brown, which might break on special colorsets. You can set which color to check for, so you could make it work with your colorset or make it seem like a different material.
So people can choose their dirt color.

@Kalphiter, are you going to use it?
« Last Edit: November 03, 2009, 11:32:22 PM by lilboarder32 »

The admin tools (Speed dig and speed place) don't work for me. There's no difference also, it gives some syntax errors in the console.

The admin tools (Speed dig and speed place) don't work for me. There's no difference also, it gives some syntax errors in the console.
It works fine for me. Try re-downloading maybe? If it still doesn't work, explain further what's happening.

i love this. thank you lil

i love this. thank you lil
Yurp. Well, I uploaded the most recent version to RTB. Hopefully it will get approved quickly with no mess. The only things I changed from V4 is that I renamed the file to Gamemode_TrenchDigging and renamed Trench Pickaxe to Trench Shovel.

NICE IM DL

Okay i had to kill someone to get this but

Cookie monster: Help me

I thought i told you to shut up -stabs him in the eye-

Okay anyway Have this cookie :cookie:



i tried some of it a few times, and notced some things that should be here:
maxbricksize to dig should be 16xcube (to save brickcount at the start.)

Part of my castle is in one pic :D