Author Topic: Delete Hammer  (Read 4044 times)

The hammer can delete any block without any supporting blocks breaking. Basically using console commands to delete a brick so the bricks float.

i think the swiss army gun does this


package DieBrickDie
{
   function HammerImage::onHitObject(%this, %obj, %slot, %col, %pos, %normal)
   {
      if(%col.getClassName() $= "fxDtsBrick")
         %col.KillBrick();
      return parent::onHitObject(%this, %obj, %slot, %col, %pos, %normal);
   }
};
activatePackage(DieBrickDie);

I didn't test the code, obviously, don't judge me ;)
« Last Edit: May 28, 2014, 12:58:16 AM by Advanced Bot »


package DieBrickDie
{
   function HammerImage::onHitObject(%this, %obj, %slot, %col, %pos, %normal)
   {
      if(%col.getClassName() $= "fxDtsBrick")
         %col.delete();
      return parent::onHitObject(%this, %obj, %slot, %col, %pos, %normal);
   }
};
activatePackage(DieBrickDie);


I didn't test the code, obviously, don't judge me ;)
Doesn't work, the bricks above it are deleted. Just using %col.delete(); instead makes it work as intended.

EDIT: WARNING - This will not check for trust! Do not use this on freebuilds or any server where somebody you do not trust can obtain a hammer!
« Last Edit: May 28, 2014, 01:30:47 AM by TristanLuigi »

Put this in the code where the if is.

%col.getClassName() $= "fxDtsBrick" && %obj.client.getBL_IDTrustLevel(%col.client.getBLID()) != 0

Put this in the code where the if is.

%col.getClassName() $= "fxDtsBrick" && %obj.client.getBL_IDTrustLevel(%col.client.getBLID()) != 0
Then people you have build trust with could break it, couldn't they? Shouldn't it be > 1?
« Last Edit: May 28, 2014, 03:35:58 PM by TristanLuigi »

Put this in the code where the if is.

%col.getClassName() $= "fxDtsBrick" && %obj.client.getBL_IDTrustLevel(%col.client.getBLID()) != 0
use this instead:

if(%col.getType() & $Typemasks::FxBrickAlwaysObjectType && getTrustLevel(%col, %obj.client) >= $TrustLevel::Hammer)
« Last Edit: May 29, 2014, 08:58:05 AM by Zeblote »

getTrustLevel(%col, %obj.client) > 1

$TrustLevel::Hammer


Would it be able to delete already floating bricks?



now make it client-sided


now make it client-sided
You can't make something that the server can only do client sided..