Get the number of voxels of a given type in the storage of the robot.
VoxelType : The type of the voxel to count.
Return an integer giving the count of the voxeltype you specified. If none are in the robot, the function return 0.
// Listing #1: Display Quantity of blackrock blue voxels.
Time <- 0;
function Voxel_Step()
{
local Count;
// The robot will play at 100 ms interval.
if ( (GetGameTime() - Time) > 100 )
{
// Display the quantity of blue voxels in the robot.
Count = GetQuantity(1);
Display( "QUANTITY OF BLUE VOXELS IN THE ROBOT : " + Count , 2000, 4, 0);
// Store actual timestamp for the next 100 ms delay.
Time = GetGameTime();
}
}
none