Intranet Catprocess
  1. news...
  2. about Blackvoxel
  3. download
  4. manual
  5. videos
  6. about us
  1. GetSlot_Quantity

    Description

    integer GetSlot_Quantity(integer SlotNum)

    Get the Voxel quantity stored in the specified slot of the robot storage.

    Parameters

    SlotNum : The slot number in the robot storage. The robot have 20 slots, so you can use the values 0 to 19.

    Return Value

    The quantity of voxels stored in the specified slot or -1 if the specified slot didn't exist.

    Example of use

    Put some voxels in the first slot of the robot inventory to display the quantity.

    // Listing #1: Display the quantity in the first robot's storage slot.
    Time <- 0; function Voxel_Step() { local VoxelType; // The robot will play at 100 ms interval. if ( (GetGameTime() - Time) > 100 ) { // Display the voxel quantity in the first used slot. VoxelType = GetSlot_Quantity(0); Display( "VOXEL QUANTITY IN THE FIRST SLOT : " + VoxelType , 1000, 4, 0); // Store actual timestamp for the next 100 ms delay. Time = GetGameTime(); } }

    See Also

    GetSlot_Type()

     
  2. Google+