Author Topic: Getting brick sizes for scripts. - SOLVED  (Read 498 times)

So I've been getting into coding a lot more, and I'd like to know how to get the size of a brick and scale a static shape to the size of that brick. If this is possible, I'd love to know, if not, are there any alternatives? I want to make a script in which creates a static shape for placement as a grid for arrows to hover over for one of the two choices I'm deciding on; A little arrow space ship simulator that displays arrows over it as ships, or player coordinates.

Long story short, I just need to find a way to get the size of the brick and output it to the setscale of the static shape. I already have a code set up to get the ID and position of the brick via a /command.
« Last Edit: February 18, 2016, 04:57:49 AM by BloxersPost »

%brick.getDatablock().dump();

you'll see all the functions for said datablock, plus the fields they have. Namely, brickSizeX, brickSizeY, brickSizeZ.
These can be accessed by %a = %brick.getDatablock().varname;

%brick.getDatablock().dump();

you'll see all the functions for said datablock, plus the fields they have. Namely, brickSizeX, brickSizeY, brickSizeZ.
These can be accessed by %a = %brick.getDatablock().varname;

Thanks man!

You could also probably just do
%scale = vectorSub(getWords(%brick.getWorldBox(), 3, 5), getWords(%brick.getWorldBox(), 0, 2));