Intranet Catprocess
  1. news...
  2. about Blackvoxel
  3. download
  4. manual
  5. videos
  6. forum
  7. about us & contact
  1. GetQuantity

    Description

    integer GetQuantity(integer VoxelType)

    Get the number of voxels of a given type in the storage of the robot.

    Parameters

    VoxelType : The type of the voxel to count.

    Return Value

    Return an integer giving the count of the voxeltype you specified. If none are in the robot, the function return 0.

    Example of use

    // 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(); } }

    See Also

    none

     
  2. Google+