Author Topic: Volume of a brick?  (Read 701 times)

Hey all, I have been searching for a while and I have yet to discover how to find the volume of a brick. Any help would be appreciated =].

%brick.getDatablock().getVolume(); - Returns the volume of the brick.

%brickObj.getVolume(); - Returns the volume of the brick.
Incorrect, it's the datablock.

%brick.dataBlock.getVolume();

Incorrect, it's the datablock.

%brick.dataBlock.getVolume();
-_-

I edited it, happy?

Thanks

Edit: Didn't work, I tried echo($Testbrick.datablock.getvolume());

Edit again: I did echo($Testbrick.getdatablock().getvolume()); and it worked lol
« Last Edit: August 06, 2012, 08:13:35 PM by Gartanium »

Incorrect, it's the datablock.

%brick.dataBlock.getVolume();

You can't retrieve the datablock from the variable like that, you need to use the function.

Edit: Didn't work, I tried echo($Testbrick.datablock.getvolume());
You need a capital "B" in "dataBlock"

You need a capital "B" in "dataBlock"
Since when is TorqueScript case sensitive?

Since when is TorqueScript case sensitive?
I have no loving clue why you need that for dataBlock.

dataBlock is definitely case-sensitive though